File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ var Parse = require('parse/node').Parse;
4
4
5
5
// Returns a promise that fulfills iff this user id is valid.
6
6
function validateAuthData ( authData ) {
7
- return request ( "tokeninfo?access_token =" + authData . access_token )
7
+ return request ( "tokeninfo?id_token =" + authData . access_token )
8
8
. then ( ( response ) => {
9
- if ( response && response . user_id == authData . id ) {
9
+ if ( response && response . sub == authData . id ) {
10
10
return ;
11
11
}
12
12
throw new Parse . Error (
@@ -23,7 +23,7 @@ function validateAppId() {
23
23
// A promisey wrapper for api requests
24
24
function request ( path ) {
25
25
return new Promise ( function ( resolve , reject ) {
26
- https . get ( "https://www.googleapis.com/oauth2/v1 /" + path , function ( res ) {
26
+ https . get ( "https://www.googleapis.com/oauth2/v3 /" + path , function ( res ) {
27
27
var data = '' ;
28
28
res . on ( 'data' , function ( chunk ) {
29
29
data += chunk ;
You can’t perform that action at this time.
0 commit comments