File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ import {
3232import { RemoteDataState } from 'src/types'
3333
3434// APIs
35- import { fetchLegacyIdentity } from './identity/apis/auth'
35+ import { fetchIdentity , fetchLegacyIdentity } from './identity/apis/auth'
3636
3737interface State {
3838 loading : RemoteDataState
@@ -96,7 +96,12 @@ export class Signin extends PureComponent<Props, State> {
9696
9797 private checkForLogin = async ( ) => {
9898 try {
99- await fetchLegacyIdentity ( )
99+ if ( isFlagEnabled ( 'quartzSession' ) ) {
100+ await fetchIdentity ( )
101+ } else {
102+ await fetchLegacyIdentity ( )
103+ }
104+
100105 this . setState ( { auth : true } )
101106 const redirectIsSet = ! ! getFromLocalStorage ( 'redirectTo' )
102107 if ( redirectIsSet ) {
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ export const fetchIdentity = async () => {
118118 if ( ! CLOUD ) {
119119 return fetchLegacyIdentity ( )
120120 }
121- // if we make it to this line we are in cloud and ui unification flag is on
121+
122122 if ( isFlagEnabled ( 'quartzIdentity' ) ) {
123123 return fetchQuartzIdentity ( )
124124 }
Original file line number Diff line number Diff line change @@ -12,13 +12,13 @@ import Notifications from 'src/shared/components/notifications/Notifications'
1212import { CloudLogoWithCubo } from 'src/onboarding/components/CloudLogoWithCubo'
1313
1414// APIs
15- import { fetchLegacyIdentity } from 'src/identity/apis/auth'
15+ import { fetchIdentity , fetchLegacyIdentity } from 'src/identity/apis/auth'
1616
1717// Components
1818import ErrorBoundary from 'src/shared/components/ErrorBoundary'
1919import LoginPageContents from 'src/onboarding/containers/LoginPageContents'
2020import { CLOUD , CLOUD_QUARTZ_URL } from 'src/shared/constants'
21- import { isFlagEnabled } from '../.. /shared/utils/featureFlag'
21+ import { isFlagEnabled } from 'src /shared/utils/featureFlag'
2222
2323const EMPTY_HISTORY_STACK_LENGTH = 2
2424
@@ -27,7 +27,12 @@ export const LoginPage: FC = () => {
2727
2828 const getSessionValidity = useCallback ( async ( ) => {
2929 try {
30- await fetchLegacyIdentity ( )
30+ if ( isFlagEnabled ( 'quartzSession' ) ) {
31+ await fetchIdentity ( )
32+ } else {
33+ await fetchLegacyIdentity ( )
34+ }
35+
3136 setHasValidSession ( true )
3237 } catch {
3338 setHasValidSession ( false )
You can’t perform that action at this time.
0 commit comments