nestjs-jwt Questions
4
Solved
Can't authorize in a route using @nestjs/[email protected] because I dont know how to configure the Document` in a right way and I couldn't find a workable answer in authorization official doc...
Militate asked 16/8, 2021 at 20:28
4
Solved
I'm trying a create a shared Guard as an external library in order to be imported and used across services. I'm not doing anything special that what is described in some guides but with the particu...
Cran asked 9/12, 2021 at 4:34
2
Solved
In nestjs I create JWT (tokens) by creating a payload object and signing it. Something like this:
const jwtPayload: JwtPayload =
{
iss: issuer,
sub: info,
aud: audience,
// exp: - populated ...
Fib asked 10/11, 2021 at 1:57
7
I want to implement a distributed authentication library to use it on several projects. The library should implement JWT authentication method. The code is as follows:
jwt.strategy.ts
import {Extra...
Ardisardisj asked 24/10, 2018 at 12:45
5
I've followed the official Nest doc (https://docs.nestjs.com/security/authentication) step by step, but I can't get validate() method called when using @AuthGuard('local') or @AuthGuard(LocalAuthGu...
Hauger asked 28/1, 2022 at 15:57
4
I like to implement more than one named passport-JWT strategy, each with its own secret. Is there any way it can be implemented?
From what I can understand from the documentation, only one secret c...
Stavros asked 21/5, 2021 at 7:53
6
I have implemented a jwt authentication in nestJs. However whenever I attempt to authenticate using the following authorization headers:
Bearer <token> or JWT <token>
I got 401. Thes...
Dynah asked 23/4, 2019 at 23:14
3
I am following the documentation present here
https://docs.nestjs.com/techniques/authentication#jwt-functionality
To have faster support I have created a git repository with the problem
https://git...
Weinreb asked 25/8, 2020 at 6:6
4
Solved
I am trying to implement a JWT strategy for authentication in my nest application.
I am getting the following error tho
Unknown authentication strategy "jwt"
This is my code:
jwt.strategy.ts
...
Nyala asked 26/2, 2020 at 0:53
3
I have a question about setting environmental variables.
In official document, it says using ConfigModule in this case, but my case is a exception case.
Because I would like to use it in super() in...
Sleazy asked 19/11, 2020 at 9:45
3
Solved
I have started to learn Nestjs, express and graphql.
I encountered a problem while trying to authorize access of user authenticated using jwt token.
I followed the tutorial for authentication on th...
Pterous asked 11/3, 2021 at 10:17
3
Solved
I'm trying to unit test this controller and mock away the services/repositories that it needs.
@Controller('auth')
export class AuthController {
constructor(
private readonly authService: AuthSer...
Pl asked 9/7, 2020 at 20:12
1
Solved
Does anybody know where I can see the full code of canActivate method in AuthGuard('jwt')? I realized that canActivate method calls JwtStrategy validate method by using console.log() like this:
// ...
Van asked 4/1, 2021 at 2:42
4
Solved
I am using @nestjs/passport. After running npm run start:dev I got an error, but the editor doesn't show an error
node_modules/@nestjs/passport/dist/passport/passport.serializer.d.ts:1:27 - error T...
Interaction asked 29/6, 2020 at 15:22
1
Solved
I have a controller that uses custom interceptor:
Controller:
@UseInterceptors(SignInterceptor)
@Get('users')
async findOne(@Query() getUserDto: GetUser) {
return await this.userService.findByU...
Indiscretion asked 27/8, 2020 at 14:48
1
© 2022 - 2025 — McMap. All rights reserved.