Skip to content

Commit

Permalink
Merge branch 'master' into lm-taskq-api
Browse files Browse the repository at this point in the history
  • Loading branch information
lahirumaramba committed May 4, 2022
2 parents f714731 + 844479a commit af0ab7a
Show file tree
Hide file tree
Showing 14 changed files with 308 additions and 136 deletions.
1 change: 1 addition & 0 deletions etc/firebase-admin.auth.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export abstract class BaseAuth {
generateEmailVerificationLink(email: string, actionCodeSettings?: ActionCodeSettings): Promise<string>;
generatePasswordResetLink(email: string, actionCodeSettings?: ActionCodeSettings): Promise<string>;
generateSignInWithEmailLink(email: string, actionCodeSettings: ActionCodeSettings): Promise<string>;
generateVerifyAndChangeEmailLink(email: string, newEmail: string, actionCodeSettings?: ActionCodeSettings): Promise<string>;
getProviderConfig(providerId: string): Promise<AuthProviderConfig>;
getUser(uid: string): Promise<UserRecord>;
getUserByEmail(email: string): Promise<UserRecord>;
Expand Down
209 changes: 97 additions & 112 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
"http-message-parser": "^0.0.34",
"lodash": "^4.17.15",
"minimist": "^1.2.6",
"mocha": "^9.1.2",
"mocha": "^10.0.0",
"mz": "^2.7.0",
"nock": "^13.0.0",
"npm-run-all": "^4.1.5",
Expand Down
4 changes: 2 additions & 2 deletions src/app-check/app-check-api-client-internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import * as validator from '../utils/validator';
import { AppCheckToken } from './app-check-api'

// App Check backend constants
const FIREBASE_APP_CHECK_V1_API_URL_FORMAT = 'https://firebaseappcheck.googleapis.com/v1beta/projects/{projectId}/apps/{appId}:exchangeCustomToken';
const FIREBASE_APP_CHECK_V1_API_URL_FORMAT = 'https://firebaseappcheck.googleapis.com/v1/projects/{projectId}/apps/{appId}:exchangeCustomToken';

const FIREBASE_APP_CHECK_CONFIG_HEADERS = {
'X-Firebase-Client': `fire-admin-node/${utils.getSdkVersion()}`
Expand Down Expand Up @@ -144,7 +144,7 @@ export class AppCheckApiClient {
* @returns An AppCheckToken instance.
*/
private toAppCheckToken(resp: HttpResponse): AppCheckToken {
const token = resp.data.attestationToken;
const token = resp.data.token;
// `ttl` is a string with the suffix "s" preceded by the number of seconds,
// with nanoseconds expressed as fractional seconds.
const ttlMillis = this.stringToMilliseconds(resp.data.ttl);
Expand Down
2 changes: 1 addition & 1 deletion src/app-check/token-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const ONE_MINUTE_IN_MILLIS = ONE_MINUTE_IN_SECONDS * 1000;
const ONE_DAY_IN_MILLIS = 24 * 60 * 60 * 1000;

// Audience to use for Firebase App Check Custom tokens
const FIREBASE_APP_CHECK_AUDIENCE = 'https://firebaseappcheck.googleapis.com/google.firebase.appcheck.v1beta.TokenExchangeService';
const FIREBASE_APP_CHECK_AUDIENCE = 'https://firebaseappcheck.googleapis.com/google.firebase.appcheck.v1.TokenExchangeService';

/**
* Class for generating Firebase App Check tokens.
Expand Down
2 changes: 1 addition & 1 deletion src/app-check/token-verifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { DecodedAppCheckToken } from './app-check-api'
import { App } from '../app';

const APP_CHECK_ISSUER = 'https://firebaseappcheck.googleapis.com/';
const JWKS_URL = 'https://firebaseappcheck.googleapis.com/v1beta/jwks';
const JWKS_URL = 'https://firebaseappcheck.googleapis.com/v1/jwks';

/**
* Class for verifying Firebase App Check tokens.
Expand Down

0 comments on commit af0ab7a

Please sign in to comment.