accounts icon indicating copy to clipboard operation
accounts copied to clipboard

Allow to pass in jwt options to findSessionByAccessToken

Open Ryiski opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe.

I have a api middleware guard which checks if a user is authenticated, i also have it setup o my refresh token route, now my issues is i am verifying my tokens on my own at the same time making sure the session is exists on my db findSessionByAccessToken throws an error is the auth token is expired but i would like to be able to pass either a the whole jwt options from the findSessionByAccessToken or just pass a boolean to ignore it or not

Describe the solution you'd like

Solution 1 : I want to be able to pass jwt options to the method or a boolean which will specify it to ignore expired tokens or not

Or

Solution 2: Throw proper jwt errors, to know what happened

PS: i can make a PR of it if needed

Ryiski avatar May 03 '22 12:05 Ryiski