-
Notifications
You must be signed in to change notification settings - Fork 89
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Problem:
- Let's say we have access tokens A1 signed with key K1, and A2 signed with key K2. K2's issue date > K1's issue date
- Right now, K1 is known to the node SDK
- if the user uses A2, it will fail verification, and go to the core. The core will return K2 which will be saved in the SDK.
- Then if the user uses A1, it will fail (cause it will not work with K2). This will also go to the core which will return
TRY_REFRESH_TOKENerror. This is unnecessary.
Solution:
- When deciding if we should query the core due to session verification failure, we should check if the access token was generated before or after the public key being checked against. If it's before, then we should query the core (it means there is a newer public key). If it's after (means this is an access token signed by an older public key), then we should simply return
TRY_REFRESH_TOKENand not query the core.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working