Hey, it seems like there is maybe something wrong ...
# support-questions-legacy
v
Hey, it seems like there is maybe something wrong with the server-side oauth redirection endpoint? On our prod site everything is fine, but when I use our internal dev site (which uses the server-side oauth stuff), we get stuck on this page
https://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:
Copy code
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:
Copy code
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
8 Views