auth-ajax icon indicating copy to clipboard operation
auth-ajax copied to clipboard

Provide helpful error if token isn't a valid JWT

Open nathan-collins opened this issue 7 years ago • 2 comments

Auth store

When I assign a token to the auth store it throws an error when it attempts to decode the token. (HTMLElement._tokenChanged (auth-store.html:139)) the token is present at this point.

Uncaught TypeError: Cannot read property 'replace' of undefined at b.exports (jwt-decode.min.js:1) at b.exports (jwt-decode.min.js:1) at HTMLElement._tokenChanged (auth-store.html:139) at HTMLElement._observerEffect (polymer.html:1662) at HTMLElement._effectEffects (polymer.html:1507) at HTMLElement._propertySetter (polymer.html:1491) at HTMLElement.setter (polymer.html:1570) at HTMLElement._formResponse (email-login-form.js:71) at HTMLElement.handler (polymer.html:566) at HTMLFormElement.fire (polymer.html:1343)

nathan-collins avatar Feb 23 '17 01:02 nathan-collins