Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide helpful error if token isn't a valid JWT #3

Open
nathan-collins opened this issue Feb 23, 2017 · 2 comments
Open

Provide helpful error if token isn't a valid JWT #3

nathan-collins opened this issue Feb 23, 2017 · 2 comments

Comments

@nathan-collins
Copy link

nathan-collins commented Feb 23, 2017

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
Copy link
Author

nevermind, my token was incorrect

@CaptainCodeman
Copy link
Owner

It should probably give a more helpful error message to make it clearer though.

@CaptainCodeman CaptainCodeman changed the title Uncaught TypeError: Cannot read property 'replace' of undefined Provide helpful error if token isn't a valid JWT Feb 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants