diff --git a/static/app/routes.tsx b/static/app/routes.tsx index 1164527cbd4ea..43bc735a56d46 100644 --- a/static/app/routes.tsx +++ b/static/app/routes.tsx @@ -2109,14 +2109,6 @@ function buildRoutes() { ); - // const experimentalSpaRoutes = EXPERIMENTAL_SPA ? ( - // - // import('sentry/views/auth/login'))} /> - // import('sentry/views/auth/login'))} /> - // - // ) : null; - - // const authRoutes = ; const authRoutes = ( import('sentry/views/auth/login'))} /> diff --git a/static/app/views/auth/login.tsx b/static/app/views/auth/login.tsx index 3821f664c1516..06477b6fe4a91 100644 --- a/static/app/views/auth/login.tsx +++ b/static/app/views/auth/login.tsx @@ -121,6 +121,7 @@ class Login extends Component { onRetry={this.fetchData} /> )} + {/* TODO: remove this below - the org page will NOT just be SSO */} {!loading && authConfig !== null && !error && ( {orgId !== undefined && ( diff --git a/static/app/views/auth/loginForm.tsx b/static/app/views/auth/loginForm.tsx index 7b6a2e57907e2..628efbac1415f 100644 --- a/static/app/views/auth/loginForm.tsx +++ b/static/app/views/auth/loginForm.tsx @@ -7,6 +7,7 @@ import {Button} from 'sentry/components/button'; import SecretField from 'sentry/components/forms/fields/secretField'; import TextField from 'sentry/components/forms/fields/textField'; import Form from 'sentry/components/forms/form'; +import FormModel from 'sentry/components/forms/model'; import Link from 'sentry/components/links/link'; import {IconGithub, IconGoogle, IconVsts} from 'sentry/icons'; import {t} from 'sentry/locale'; @@ -56,6 +57,12 @@ function LoginForm({authConfig}: Props) { const {githubLoginLink, vstsLoginLink} = authConfig; const hasLoginProvider = !!(githubLoginLink || vstsLoginLink); + /** + * Org options here allow us to point the form request to either the new api or the + * original login api + * (gets passed down the form model to the client that sends the request) + */ + const form = new FormModel({apiOptions: {baseUrl: ''}}); return ( @@ -89,6 +96,8 @@ function LoginForm({authConfig}: Props) { {t('Lost your password?')} } + // NOTE: passing form model in allows us to specify the base url (should we hit /api/0/... or hit the original api endpoints) + model={form} > {error && {error}}