Skip to content
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

Documentation for Authentication for JWT #833

Closed
Tyler-V opened this issue Jul 2, 2018 · 4 comments
Closed

Documentation for Authentication for JWT #833

Tyler-V opened this issue Jul 2, 2018 · 4 comments

Comments

@Tyler-V
Copy link

Tyler-V commented Jul 2, 2018

I'm submitting a...


[ ] Regression 
[ ] Bug report
[ ] Feature request
[X] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

https://docs.nestjs.com/techniques/authentication

Current documentation shows the use of 'jwt' as the scheme set @UseGuards(AuthGuard('jwt'))

https://github.com/themikenicholson/passport-jwt

However suggests Authorization: bearer JSON_WEB_TOKEN_STRING.....

Expected behavior

Which is the standard? Should we use @UseGuards(AuthGuard('bearer'))?

@cojack
Copy link
Contributor

cojack commented Jul 3, 2018

@Tyler-V Idk If I get you, but point of usage @UseGuards(AuthGuard('jwt')) is only a strategy name, it's not related to the Authorization: bearer JSON_WEB_TOKEN_STRING..... at all.

@Tyler-V
Copy link
Author

Tyler-V commented Jul 3, 2018

@cojack inspecting the definition, it looked like it was looking for a type or key. You are right it is a strategy name the scheme set still comes from jwtFromRequest of PassportStrategy

It is (and still is) unclear to me where the strategies in @UseGuards(AuthGuard('?')) come from, I have combed the docs, type definition and source files but using 'jwt' is indeed what I am looking for...

@kamilmysliwiec
Copy link
Member

Let's track this issue here nestjs/docs.nestjs.com#99

@lock
Copy link

lock bot commented Sep 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants