Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Formatting
  • Loading branch information
jamesdaniels committed Mar 25, 2025
commit 5568a01c7c540356df37d0133c83ea6c3f26e4a5
1 change: 1 addition & 0 deletions .changeset/orange-turtles-taste.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
'firebase': minor
'@firebase/auth': minor
---

Expand Down
6 changes: 3 additions & 3 deletions packages/auth/src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ export const enum Endpoint {
REVOKE_TOKEN = '/v2/accounts:revokeToken'
}

const CookieAuthProxiedEndpoints: Array<string> = [
const CookieAuthProxiedEndpoints: string[] = [
Endpoint.SIGN_IN_WITH_CUSTOM_TOKEN,
Endpoint.SIGN_IN_WITH_EMAIL_LINK,
Endpoint.SIGN_IN_WITH_IDP,
Endpoint.SIGN_IN_WITH_PASSWORD,
Endpoint.SIGN_IN_WITH_PHONE_NUMBER,
Endpoint.TOKEN,
Endpoint.TOKEN
];

export const enum RecaptchaClientType {
Expand Down Expand Up @@ -281,7 +281,7 @@ export function _getFinalTarget(
: `${auth.config.apiScheme}://${base}`;

// TODO get the exchange URL from the persistence method
// don't use startsWith v1/accounts...
// this solves the window test
if (
authInternal._getPersistence() === PersistenceType.COOKIE &&
CookieAuthProxiedEndpoints.includes(path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ export class PersistenceUserManager {
return null;
}
if (typeof blob === 'string') {
const response = await getAccountInfo(this.auth, { idToken: blob }).catch(() => undefined);
const response = await getAccountInfo(this.auth, { idToken: blob }).catch(
() => undefined
);
if (!response) {
return null;
}
Expand Down Expand Up @@ -157,7 +159,9 @@ export class PersistenceUserManager {
if (blob) {
let user: UserInternal;
if (typeof blob === 'string') {
const response = await getAccountInfo(auth, { idToken: blob }).catch(() => undefined);
const response = await getAccountInfo(auth, {
idToken: blob
}).catch(() => undefined);
if (!response) {
break;
}
Expand Down
Loading