Skip to content

Commit 4ac4d92

Browse files
committed
Fix postBody parameter (omitted vs null)
1 parent 3ed0b08 commit 4ac4d92

File tree

5 files changed

+3
-5
lines changed

5 files changed

+3
-5
lines changed

packages-exp/auth-exp/src/api/authentication/idp.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ describe('api/authentication/signInWithIdp', () => {
3333
const request = {
3434
returnSecureToken: true,
3535
requestUri: 'request-uri',
36-
postBody: null
3736
};
3837

3938
let auth: TestAuth;

packages-exp/auth-exp/src/api/authentication/idp.ts

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

2222
export interface SignInWithIdpRequest {
2323
requestUri: string;
24-
postBody: string | null;
24+
postBody?: string;
2525
sessionId?: string;
2626
tenantId?: string;
2727
returnSecureToken: boolean;

packages-exp/auth-exp/src/core/credentials/oauth.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ describe('core/credentials/oauth', () => {
165165
expect(request.requestUri).to.eq('http://localhost');
166166
expect(request.returnSecureToken).to.be.true;
167167
expect(request.pendingToken).to.eq('pending-token');
168-
expect(request.postBody).to.be.null;
168+
expect(request.postBody).to.be.undefined;
169169
});
170170
});
171171

packages-exp/auth-exp/src/core/credentials/oauth.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ export class OAuthCredential extends AuthCredential {
173173
const request: SignInWithIdpRequest = {
174174
requestUri: IDP_REQUEST_URI,
175175
returnSecureToken: true,
176-
postBody: null
177176
};
178177

179178
if (this.pendingToken) {

packages-exp/auth-exp/src/core/strategies/idp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class IdpCredential extends AuthCredential {
7070
const request: SignInWithIdpRequest = {
7171
requestUri: this.params.requestUri,
7272
sessionId: this.params.sessionId,
73-
postBody: this.params.postBody || null,
73+
postBody: this.params.postBody,
7474
tenantId: this.params.tenantId,
7575
pendingToken: this.params.pendingToken,
7676
returnSecureToken: true,

0 commit comments

Comments
 (0)