vivalapanda
07/21/2023, 6:50 PMhttps://supertokens.com/dev/oauth/redirect-to-app?state=33ed86c5c781c2f09727f&code=[redacted]&scope=email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+openid&authuser=0&hd=ought.org&prompt=none
With this error:
Uncaught DOMException: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
at redirectToSuperTokens
at https://supertokens.com/dev/oauth/redirect-to-app:38:9
Which refers to this block in the redirectToSuperTokens()
function:
js
if (state !== null) {
// base 64 decode the state as a json string
let decodedState = JSON.parse(atob(state));
let frontendRedirectUrl = decodedState["frontendRedirectURI"];
if (frontendRedirectUrl !== undefined && typeof frontendRedirectUrl === "string") {
redirect_uri = frontendRedirectUrl;
}
}
I've made a dev environ that's off the same SHA as our latest prod deploy and it still has the issue, so it seems like something broke outside of our code