From 39efe219c888c07047d49c96bc60fe88e97049ff Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Tue, 8 Dec 2020 01:30:05 -0500 Subject: [PATCH] always redirect to api:/login-bounce instead of making the user interact with the page -- offically disabling DM auth --- src/pages/auth/login.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/auth/login.tsx b/src/pages/auth/login.tsx index e749d41..e1a9f11 100644 --- a/src/pages/auth/login.tsx +++ b/src/pages/auth/login.tsx @@ -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`, + }, }; };