Skip to content

Fix postBody parameter for Auth sign in #4571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages-exp/auth-exp/src/api/authentication/idp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ use(chaiAsPromised);
describe('api/authentication/signInWithIdp', () => {
const request = {
returnSecureToken: true,
requestUri: 'request-uri',
postBody: null
requestUri: 'request-uri'
};

let auth: TestAuth;
Expand Down
2 changes: 1 addition & 1 deletion packages-exp/auth-exp/src/api/authentication/idp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Auth } from '../../model/public_types';

export interface SignInWithIdpRequest {
requestUri: string;
postBody: string | null;
postBody?: string;
sessionId?: string;
tenantId?: string;
returnSecureToken: boolean;
Expand Down
2 changes: 1 addition & 1 deletion packages-exp/auth-exp/src/core/credentials/oauth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ describe('core/credentials/oauth', () => {
expect(request.requestUri).to.eq('http://localhost');
expect(request.returnSecureToken).to.be.true;
expect(request.pendingToken).to.eq('pending-token');
expect(request.postBody).to.be.null;
expect(request.postBody).to.be.undefined;
});
});

Expand Down
3 changes: 1 addition & 2 deletions packages-exp/auth-exp/src/core/credentials/oauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ export class OAuthCredential extends AuthCredential {
private buildRequest(): SignInWithIdpRequest {
const request: SignInWithIdpRequest = {
requestUri: IDP_REQUEST_URI,
returnSecureToken: true,
postBody: null
returnSecureToken: true
};

if (this.pendingToken) {
Expand Down
2 changes: 1 addition & 1 deletion packages-exp/auth-exp/src/core/strategies/idp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class IdpCredential extends AuthCredential {
const request: SignInWithIdpRequest = {
requestUri: this.params.requestUri,
sessionId: this.params.sessionId,
postBody: this.params.postBody || null,
postBody: this.params.postBody,
tenantId: this.params.tenantId,
pendingToken: this.params.pendingToken,
returnSecureToken: true,
Expand Down