When my window loads I run the following code:
gapi.load("client:auth2", () => {
gapi.auth2.init({
client_id: "MY_CLIENT_ID.apps.googleusercontent.com"
});
});
After the initialization completes and after the user clicks a sign-in button, I run the following code:
gapi.auth2.getAuthInstance()
.signIn({ scope: "https://www.googleapis.com/auth/youtube.force-ssl" })
.then((res) => {
console.log("Sign-in successful");
console.log(res);
})
.catch((err) => {
console.error("Error signing in");
console.error(err);
})
;
I get the following error in my console:
error: "server_error"
