Created
November 7, 2019 06:18
-
-
Save wgao19/8ff779ec011919ca8fff00d162bd10f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function loadAuthInstance() { | |
const load = new Promise(function(resolve, reject) { | |
gapi.load('auth2', resolve); | |
}); | |
return load.then(async () => { | |
return await window.gapi.auth2 | |
.init({ | |
client_id: 'client-id-apparently', | |
}) | |
.then(authInstance => { | |
window.authInstance = authInstance; | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment