Skip to content

Commit decb660

Browse files
authored
fix: use idpe me for auth polling (#5021)
1 parent be8248d commit decb660

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Signin.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import {
3333
import {RemoteDataState} from 'src/types'
3434

3535
// APIs
36-
import {fetchIdentity} from './identity/apis/auth'
36+
import {fetchLegacyIdentity} from './identity/apis/auth'
3737

3838
interface State {
3939
loading: RemoteDataState
@@ -97,7 +97,7 @@ export class Signin extends PureComponent<Props, State> {
9797

9898
private checkForLogin = async () => {
9999
try {
100-
await fetchIdentity()
100+
await fetchLegacyIdentity()
101101
this.setState({auth: true})
102102
const redirectIsSet = !!getFromLocalStorage('redirectTo')
103103
if (redirectIsSet) {

src/identity/apis/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export const fetchQuartzMe = async (): Promise<MeQuartz> => {
189189
}
190190

191191
// fetch user identity from /me (used in OSS and environments without Quartz)
192-
const fetchLegacyIdentity = async (): Promise<UserResponseIdpe> => {
192+
export const fetchLegacyIdentity = async (): Promise<UserResponseIdpe> => {
193193
const response = await getMeIdpe({})
194194

195195
if (response.status === 401) {

src/onboarding/containers/LoginPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Notifications from 'src/shared/components/notifications/Notifications'
1212
import {CloudLogoWithCubo} from 'src/onboarding/components/CloudLogoWithCubo'
1313

1414
// APIs
15-
import {fetchIdentity} from 'src/identity/apis/auth'
15+
import {fetchLegacyIdentity} from 'src/identity/apis/auth'
1616

1717
// Components
1818
import ErrorBoundary from 'src/shared/components/ErrorBoundary'
@@ -25,7 +25,7 @@ export const LoginPage: FC = () => {
2525

2626
const getSessionValidity = useCallback(async () => {
2727
try {
28-
await fetchIdentity()
28+
await fetchLegacyIdentity()
2929
setHasValidSession(true)
3030
} catch {
3131
setHasValidSession(false)

0 commit comments

Comments
 (0)