Skip to content

Commit 1c327d4

Browse files
authored
fix: updated google token endpoint (#404)
1 parent 14d564c commit 1c327d4

File tree

8 files changed

+9
-7
lines changed

8 files changed

+9
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [unreleased]
99

10+
- Updated google token endpoint.
11+
1012
## [12.0.4] - 2022-10-14
1113

1214
### Changed:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ For any queries, or support requests, please email us at [email protected], o
2727

2828
Created with :heart: by the folks at supertokens.com.
2929

30-
[![Featured on Openbase](https://badges.openbase.com/js/featured/supertokens-node.svg?style=openbase&token=ficVFymu0SAHNI+0JUEDA2pHn93FLoj8k0VayFpvZ3Y=)](https://openbase.com/js/supertokens-node?utm_source=embedded&utm_medium=badge&utm_campaign=rate-badge)
30+
[![Featured on Openbase](https://badges.openbase.com/js/featured/supertokens-node.svg?style=openbase&token=ficVFymu0SAHNI+0JUEDA2pHn93FLoj8k0VayFpvZ3Y=)](https://openbase.com/js/supertokens-node?utm_source=embedded&utm_medium=badge&utm_campaign=rate-badge)

lib/build/recipe/thirdparty/providers/google.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const axios_1 = require("axios");
3535
function Google(config) {
3636
const id = "google";
3737
function get(redirectURI, authCodeFromRequest) {
38-
let accessTokenAPIURL = "https://accounts.google.com/o/oauth2/token";
38+
let accessTokenAPIURL = "https://oauth2.googleapis.com/token";
3939
let accessTokenAPIParams = {
4040
client_id: config.clientId,
4141
client_secret: config.clientSecret,

lib/build/recipe/thirdparty/providers/googleWorkspaces.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function GW(config) {
3737
const id = "google-workspaces";
3838
let domain = config.domain === undefined ? "*" : config.domain;
3939
function get(redirectURI, authCodeFromRequest) {
40-
let accessTokenAPIURL = "https://accounts.google.com/o/oauth2/token";
40+
let accessTokenAPIURL = "https://oauth2.googleapis.com/token";
4141
let accessTokenAPIParams = {
4242
client_id: config.clientId,
4343
client_secret: config.clientSecret,

lib/ts/recipe/thirdparty/providers/google.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default function Google(config: TypeThirdPartyProviderGoogleConfig): Type
2929
const id = "google";
3030

3131
function get(redirectURI: string | undefined, authCodeFromRequest: string | undefined): TypeProviderGetResponse {
32-
let accessTokenAPIURL = "https://accounts.google.com/o/oauth2/token";
32+
let accessTokenAPIURL = "https://oauth2.googleapis.com/token";
3333
let accessTokenAPIParams: { [key: string]: string } = {
3434
client_id: config.clientId,
3535
client_secret: config.clientSecret,

lib/ts/recipe/thirdparty/providers/googleWorkspaces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default function GW(config: TypeThirdPartyProviderGoogleWorkspacesConfig)
3232
let domain: string = config.domain === undefined ? "*" : config.domain;
3333

3434
function get(redirectURI: string | undefined, authCodeFromRequest: string | undefined): TypeProviderGetResponse {
35-
let accessTokenAPIURL = "https://accounts.google.com/o/oauth2/token";
35+
let accessTokenAPIURL = "https://oauth2.googleapis.com/token";
3636
let accessTokenAPIParams: { [key: string]: string } = {
3737
client_id: config.clientId,
3838
client_secret: config.clientSecret,

test/thirdparty/provider.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ describe(`providerTest: ${printPath("[test/thirdparty/provider.test.js]")}`, fun
8383
let providerInfo = ThirPartyRecipe.getInstanceOrThrowError().providers[0];
8484
assert.strictEqual(providerInfo.id, "google");
8585
let providerInfoGetResult = await providerInfo.get();
86-
assert.strictEqual(providerInfoGetResult.accessTokenAPI.url, "https://accounts.google.com/o/oauth2/token");
86+
assert.strictEqual(providerInfoGetResult.accessTokenAPI.url, "https://oauth2.googleapis.com/token");
8787
assert.strictEqual(
8888
providerInfoGetResult.authorisationRedirect.url,
8989
"https://accounts.google.com/o/oauth2/v2/auth"

test/thirdpartypasswordless/provider.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ describe(`providerTest: ${printPath("[test/thirdpartypasswordless/provider.test.
9191
let providerInfo = ThirdPartyPasswordlessRecipe.getInstanceOrThrowError().config.providers[0];
9292
assert.strictEqual(providerInfo.id, "google");
9393
let providerInfoGetResult = await providerInfo.get();
94-
assert.strictEqual(providerInfoGetResult.accessTokenAPI.url, "https://accounts.google.com/o/oauth2/token");
94+
assert.strictEqual(providerInfoGetResult.accessTokenAPI.url, "https://oauth2.googleapis.com/token");
9595
assert.strictEqual(
9696
providerInfoGetResult.authorisationRedirect.url,
9797
"https://accounts.google.com/o/oauth2/v2/auth"

0 commit comments

Comments
 (0)