File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 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;
44
55// Returns a promise that fulfills iff this user id is valid.
66function validateAuthData ( authData ) {
7- return request ( "tokeninfo?access_token =" + authData . access_token )
7+ return request ( "tokeninfo?id_token =" + authData . access_token )
88 . then ( ( response ) => {
9- if ( response && response . user_id == authData . id ) {
9+ if ( response && response . sub == authData . id ) {
1010 return ;
1111 }
1212 throw new Parse . Error (
@@ -23,7 +23,7 @@ function validateAppId() {
2323// A promisey wrapper for api requests
2424function request ( path ) {
2525 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 ) {
2727 var data = '' ;
2828 res . on ( 'data' , function ( chunk ) {
2929 data += chunk ;
You can’t perform that action at this time.
0 commit comments