appy-one / acebase-client

Client to connect to remote AceBase NoSQL database server
MIT License
21 stars 8 forks source link

OAuth provider signin fails after redirect #1

Closed appy-one closed 3 years ago

appy-one commented 3 years ago

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)

appy-one commented 3 years ago

Fix published with v1.1.0