Skip to content

Commit 284c27c

Browse files
committed
Minor changes after e2e test
1 parent ba1d91a commit 284c27c

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

packages/auth/src/api/authentication/exchange_token.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { Auth } from '../../model/public_types';
2323

2424
export interface ExchangeTokenRequest {
2525
parent: string;
26-
token: string;
26+
id_token: string;
2727
}
2828

2929
export interface ExchangeTokenResponse {

packages/auth/src/api/index.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,17 +168,12 @@ async function performApiRequest<T, V>(
168168
}
169169
}
170170

171-
let queryParamString: string;
172-
if (isRegionalAuthInitialized(auth)) {
173-
queryParamString = querystring({
174-
...params
175-
}).slice(1);
176-
} else {
177-
queryParamString = querystring({
171+
const queryParamString = querystring({
178172
key: auth.config.apiKey,
179173
...params
180174
}).slice(1);
181-
}
175+
console.log("here");
176+
console.log(queryParamString);
182177

183178
const headers = await (auth as AuthInternal)._getAdditionalHeaders();
184179
headers[HttpHeader.CONTENT_TYPE] = 'application/json';

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export const enum DefaultConfig {
9595
API_HOST = 'identitytoolkit.googleapis.com',
9696
API_SCHEME = 'https',
9797
// TODO(sammansi): Update the endpoint before BYO-CIAM Private Preview Release.
98-
REGIONAL_API_HOST = 'identityplatform.googleapis.com/v2alpha/'
98+
REGIONAL_API_HOST = 'autopush-identityplatform.sandbox.googleapis.com/v2alpha/'
9999
}
100100

101101
export class AuthImpl implements AuthInternal, _FirebaseService {

packages/auth/src/core/strategies/exhange_token.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ export async function exchangeToken(
5252
const authInternal = _castAuth(auth);
5353
const token = await getToken(authInternal, {
5454
parent: buildParent(auth, idpConfigId),
55-
token: customToken
55+
// eslint-disable-next-line camelcase
56+
id_token: customToken
5657
});
5758
if (token) {
5859
await authInternal._updateFirebaseToken({

0 commit comments

Comments
 (0)