mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-24 19:39:11 +00:00
always redirect to api:/login-bounce instead of making the user interact with the page -- offically disabling DM auth
This commit is contained in:
parent
5d17105eba
commit
39efe219c8
1 changed files with 5 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
import { GetServerSidePropsContext } from 'next';
|
||||
import { GetServerSideProps } from 'next';
|
||||
import getConfig from 'next/config';
|
||||
import * as React from 'react';
|
||||
import { AuthLogin } from 'roleypoly/design-system/templates/auth-login';
|
||||
|
@ -14,12 +14,15 @@ const loginPage = (props: { apiURI: string }) => {
|
|||
|
||||
export default loginPage;
|
||||
|
||||
export const getServerSideProps = async (context: GetServerSidePropsContext) => {
|
||||
export const getServerSideProps: GetServerSideProps = async () => {
|
||||
const { publicRuntimeConfig } = getConfig();
|
||||
|
||||
return {
|
||||
props: {
|
||||
apiURI: publicRuntimeConfig.apiPublicURI,
|
||||
},
|
||||
redirect: {
|
||||
destination: `${publicRuntimeConfig.apiPublicURI}/login-bounce`,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue