Skip to content

Commit 2338348

Browse files
committed
Address PR comments
1 parent c9f7c35 commit 2338348

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/auth/src/core/auth/auth_impl.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,7 @@ export class AuthImpl implements AuthInternal, _FirebaseService {
657657

658658
return headers;
659659
}
660+
660661
async _getAppCheckToken(): Promise<string | undefined> {
661662
const appCheckTokenResult = await this.appCheckServiceProvider
662663
.getImmediate({ optional: true })

packages/auth/src/core/util/handler.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,13 @@ export async function _getRedirectUrl(
118118
// Sets the App Check token to pass to the widget
119119
const appCheckToken = await auth._getAppCheckToken();
120120
const appCheckTokenFragment = appCheckToken
121-
? `${FIREBASE_APP_CHECK_FRAGMENT_ID}=${encodeURIComponent(appCheckToken)}`
121+
? `#${FIREBASE_APP_CHECK_FRAGMENT_ID}=${encodeURIComponent(appCheckToken)}`
122122
: '';
123-
const fragment = appCheckTokenFragment ? `#${appCheckTokenFragment}` : '';
124123

125124
// Start at index 1 to skip the leading '&' in the query string
126125
return `${getHandlerBase(auth)}?${querystring(paramsDict).slice(
127126
1
128-
)}${fragment}`;
127+
)}${appCheckTokenFragment}`;
129128
}
130129

131130
function getHandlerBase({ config }: AuthInternal): string {

0 commit comments

Comments
 (0)