File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed
src/onboarding/containers Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,6 @@ import LoginPageContents from 'src/onboarding/containers/LoginPageContents'
2020import { CLOUD } from 'src/shared/constants'
2121import { isFlagEnabled } from 'src/shared/utils/featureFlag'
2222
23- let getQuartzLoginUrl
24-
25- if ( CLOUD ) {
26- getQuartzLoginUrl =
27- require ( 'src/client/uiproxydRoutes' ) . getUiproxyQuartzLoginUrl
28- }
29-
3023const EMPTY_HISTORY_STACK_LENGTH = 2
3124
3225export const LoginPage : FC = ( ) => {
@@ -63,11 +56,21 @@ export const LoginPage: FC = () => {
6356 } else {
6457 if ( isFlagEnabled ( 'universalLogin' ) ) {
6558 if ( CLOUD ) {
66- getQuartzLoginUrl ( { } )
59+ fetch ( '/api/env/quartz-login-url' )
6760 . then ( response => {
68- const redirectUrl = response . data
69- console . warn ( 'Redirect to cloud url: ' , redirectUrl )
70- window . location . replace ( redirectUrl )
61+ response
62+ . text ( )
63+ . then ( response => {
64+ const redirectUrl = response
65+ console . warn ( 'Redirect to cloud url: ' , redirectUrl )
66+ window . location . replace ( redirectUrl )
67+ } )
68+ . catch ( error => {
69+ console . error (
70+ 'Failed to fetch /api/env/quartz-login-url' ,
71+ error
72+ )
73+ } )
7174 } )
7275 . catch ( error => console . error ( error ) )
7376 return
You can’t perform that action at this time.
0 commit comments