always redirect to api:/login-bounce instead of making the user interact with the page -- offically disabling DM auth

This commit is contained in:
41666 2020-12-08 01:30:05 -05:00
parent 5d17105eba
commit 39efe219c8

View file

@ -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`,
},
};
};