Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Non-valid token format produces an unhandled error #13

Open
ozanyurtsever opened this issue Feb 7, 2021 · 0 comments
Open

Non-valid token format produces an unhandled error #13

ozanyurtsever opened this issue Feb 7, 2021 · 0 comments

Comments

@ozanyurtsever
Copy link

Describe the bug
When the format of the token string supplied is not a valid JWT, the decoded string is not parsable.

To Reproduce
Steps to reproduce the behavior:

  1. Supply the necessary keys and ids from Cognito user pool
  2. Run the verify function with suplying a non-valid token string(e.g; kskfma123231)
  3. You will see an error: SyntaxError: Unexpected token � in JSON at position 0

Expected behavior
The error should be handled and a clear prompt should be given to the user.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant