You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was just trying to implement a jwt token auth with refresh token for my app, however, i was getting this error when ember-simple-auth-token tries to decode the jwt received from the server
Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
The thing is we try to do a base64 decode, however as specified in the JWT rfc7519(https://tools.ietf.org/html/rfc7519), the payload is base64url encoded, so window.atob will fail to decode it.
The text was updated successfully, but these errors were encountered:
I was just trying to implement a jwt token auth with refresh token for my app, however, i was getting this error when ember-simple-auth-token tries to decode the jwt received from the server
Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
I looked into the issue for a bit, tracked it down to this line: https://github.com/jpadilla/ember-simple-auth-token/blob/master/addon/authenticators/jwt.js#L284
The thing is we try to do a base64 decode, however as specified in the JWT rfc7519(https://tools.ietf.org/html/rfc7519), the payload is base64url encoded, so
window.atob
will fail to decode it.The text was updated successfully, but these errors were encountered: