After signing in with an OAuth2 provider, the user is successfully redirected back to the site with ?result=[base64 encoded data]. BUT, the function handling the redirect result fails because it uses Buffer.from to do the base64 decoding, which is not supported in the browser.
Example:
const result = client.auth.getRedirectResult(); // Error
Solution: add browser polyfill for base64 decoding (safely with utf8 characters)
After signing in with an OAuth2 provider, the user is successfully redirected back to the site with ?result=[base64 encoded data]. BUT, the function handling the redirect result fails because it uses
Buffer.from
to do the base64 decoding, which is not supported in the browser.Example:
Solution: add browser polyfill for base64 decoding (safely with utf8 characters)