Skip to content

Commit a774e3a

Browse files
Code-Hexgithub-actions[bot]
authored andcommitted
Apply auto lint-fix changes
1 parent 831bbca commit a774e3a

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/auth.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ export class BaseAuth {
6060
* token's decoded claims if the ID token is valid; otherwise, a rejected
6161
* promise.
6262
*/
63-
public async verifyIdToken(idToken: string, checkRevoked = false, env?: EmulatorEnv, clockSkewSeconds?: number): Promise<FirebaseIdToken> {
63+
public async verifyIdToken(
64+
idToken: string,
65+
checkRevoked = false,
66+
env?: EmulatorEnv,
67+
clockSkewSeconds?: number
68+
): Promise<FirebaseIdToken> {
6469
const isEmulator = useEmulator(env);
6570
const decodedIdToken = await this.idTokenVerifier.verifyJWT(idToken, isEmulator, clockSkewSeconds);
6671
// Whether to check if the token was revoked.

src/token-verifier.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,15 +241,19 @@ export class FirebaseTokenVerifier {
241241
throw new FirebaseAuthError(
242242
AuthClientErrorCode.INVALID_ARGUMENT,
243243
'clockSkewSeconds must be an integer between 0 and 60.'
244-
)
244+
);
245245
}
246246
return this.decodeAndVerify(jwtToken, isEmulator, clockSkewSeconds).then(payload => {
247247
payload.uid = payload.sub;
248248
return payload;
249249
});
250250
}
251251

252-
private async decodeAndVerify(token: string, isEmulator: boolean, clockSkewSeconds: number = 5): Promise<FirebaseIdToken> {
252+
private async decodeAndVerify(
253+
token: string,
254+
isEmulator: boolean,
255+
clockSkewSeconds: number = 5
256+
): Promise<FirebaseIdToken> {
253257
const currentTimestamp = Math.floor(Date.now() / 1000) + clockSkewSeconds;
254258
try {
255259
const rs256Token = this.safeDecode(token, isEmulator, currentTimestamp);

0 commit comments

Comments
 (0)