Skip to content

Commit a0a5718

Browse files
authored
Merge branch 'master' into prettier
2 parents 8049494 + c7357ed commit a0a5718

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

spec/AuthenticationAdapters.spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -517,21 +517,21 @@ describe('google auth adapter', () => {
517517
const httpsRequest = require('../lib/Adapters/Auth/httpsRequest');
518518

519519
it('should use id_token for validation is passed', async () => {
520-
spyOn(httpsRequest, 'request').and.callFake(() => {
520+
spyOn(httpsRequest, 'get').and.callFake(() => {
521521
return Promise.resolve({ sub: 'userId' });
522522
});
523523
await google.validateAuthData({ id: 'userId', id_token: 'the_token' }, {});
524524
});
525525

526526
it('should use id_token for validation is passed and responds with user_id', async () => {
527-
spyOn(httpsRequest, 'request').and.callFake(() => {
527+
spyOn(httpsRequest, 'get').and.callFake(() => {
528528
return Promise.resolve({ user_id: 'userId' });
529529
});
530530
await google.validateAuthData({ id: 'userId', id_token: 'the_token' }, {});
531531
});
532532

533533
it('should use access_token for validation is passed and responds with user_id', async () => {
534-
spyOn(httpsRequest, 'request').and.callFake(() => {
534+
spyOn(httpsRequest, 'get').and.callFake(() => {
535535
return Promise.resolve({ user_id: 'userId' });
536536
});
537537
await google.validateAuthData(
@@ -541,14 +541,14 @@ describe('google auth adapter', () => {
541541
});
542542

543543
it('should use access_token for validation is passed with sub', async () => {
544-
spyOn(httpsRequest, 'request').and.callFake(() => {
544+
spyOn(httpsRequest, 'get').and.callFake(() => {
545545
return Promise.resolve({ sub: 'userId' });
546546
});
547547
await google.validateAuthData({ id: 'userId', id_token: 'the_token' }, {});
548548
});
549549

550550
it('should fail when the id_token is invalid', async () => {
551-
spyOn(httpsRequest, 'request').and.callFake(() => {
551+
spyOn(httpsRequest, 'get').and.callFake(() => {
552552
return Promise.resolve({ sub: 'badId' });
553553
});
554554
try {
@@ -563,7 +563,7 @@ describe('google auth adapter', () => {
563563
});
564564

565565
it('should fail when the access_token is invalid', async () => {
566-
spyOn(httpsRequest, 'request').and.callFake(() => {
566+
spyOn(httpsRequest, 'get').and.callFake(() => {
567567
return Promise.resolve({ sub: 'badId' });
568568
});
569569
try {

src/Adapters/Auth/google.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function validateAppId() {
5151

5252
// A promisey wrapper for api requests
5353
function googleRequest(path) {
54-
return httpsRequest.request('https://www.googleapis.com/oauth2/v3/' + path);
54+
return httpsRequest.get("https://www.googleapis.com/oauth2/v3/" + path);
5555
}
5656

5757
module.exports = {

0 commit comments

Comments
 (0)