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
Create a way to manually validate a Session token #3724
Comments
sashalikesplanes
changed the title
Create Session.validate
Create a way to manually validate a Session token
Mar 23, 2024
Is this for the current Auth construct or future-auth? |
Current Auth construct, specifically the Session component of it
…On Wed, 27 Mar 2024, 00:47 Jay, ***@***.***> wrote:
Is this for the current Auth construct or future-auth?
—
Reply to this email directly, view it on GitHub
<#3724 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATCHQBEXLPU7V6PB46SVCE3Y2ICIRAVCNFSM6AAAAABFE2YIMKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRRGY3DAMZXGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've stumbled upon a use case where I had to pass a JWT token created by
Session
through a query parameter.I do not see any way to manually verify if a token was created by
Session
.I propose to adjust the
useSession
by changing the signature touseSession(token?: string)
, but I am not sure how that would interact withContext.memo
Alternatively
Session.validate(token: string)
can be added which will use the same internals asuseSession
to validate the token with an identical return type.Having read through the code in
session.ts
I believe I could implement such a feature.Are you open to merging such a PR? Which approach suits your style better?
The text was updated successfully, but these errors were encountered: