hapijs / jwt

JWT (JSON Web Token) Authentication
Other
36 stars 25 forks source link

Accept token from url search query param #49

Open lallenfrancisl opened 2 years ago

lallenfrancisl commented 2 years ago

Support plan

Community

Context

Some apps need the ability to parse token from url. A usecase would be to implement reset password links.

What problem are you trying to solve?

Allow the plugin to read token from url search query param. Something like https://api.test.com?token=sdfsdfsdfsf would be read and parsed

Implementing this opens up the plugin to a wide variety of usecases, like email reset password links, token based file access etc

Do you have a new or modified API suggestion to solve the problem?

Yes, this can be done similar to what we did with cookieName

pelov commented 1 year ago

Any chance that this gets fixed soon? Reading tokens from query parameters is useful in certain scenarios and I was surprised that the library doesn't support it.

mautematico commented 1 year ago

@pelov see #50