Skip to main content

All Questions

0 votes
0 answers
28 views

Passport.js JWT Typescript Conflict with req

middleware: import { Response, NextFunction } from 'express'; import { Role } from '@prisma/client'; import { IUserRequest } from '@/interfaces/custom-request.interface'; export const verifyRoles = (....
Jonathan Franzen's user avatar
1 vote
0 answers
54 views

Passport and NestJS login not functioning – seeking assistance

My problem is, when I'm trying to login, I have this responses : { "message": "Unauthorized", "statusCode": 401 } when I'm looking in my console.log, I have this ...
Alexscdt's user avatar
0 votes
0 answers
73 views

Passport.js Google OAuth: Best Practices for Handling and Customizing Error Responses

I'm working on implementing Google OAuth authentication in my Node.js application using Passport.js. I have set up a custom error-handling middleware to handle authentication errors, but it's not ...
Roni Jack Vituli's user avatar
1 vote
1 answer
124 views

MultiSamlStrategy in NestJs

I see that passport-saml provides multi saml strategy to use as following (reference). const { MultiSamlStrategy } = require('passport-saml'); passport.use(new MultiSamlStrategy( { ...
Anonymous Creator's user avatar
0 votes
0 answers
109 views

Is there a way for CONNECT-PG-SIMPLE to automatically remove expired sessions in DB?

I am trying to fully understand the authentication flow for Node/Express, PasspostJS, and Postgres from a basic side-project. Logging in from the App creates a cookie that expires in 1 day in the ...
rozeluxe08's user avatar
0 votes
0 answers
68 views

PassportJS `logout()` request stuck pending

When calling the passport logout() function to clear cookie session, http request gets stuck pending: I set the routes in auth.routes.ts: router.get('/login', (req: Request, res: Response) => { ...
dashy's user avatar
  • 11
0 votes
0 answers
182 views

Passport OIDC Authentication Strategy Problem

I am facing an issue with my OIDC Authentication with Passport. The project is in NodeJS, Typescript. The infra of the project is microservices with a proxy forwarding the requests to the ...
Paraskevas Louka's user avatar
0 votes
2 answers
278 views

Why I'm getting error when accessing req.user.id?

I have a setup of passport authentication on my express, node project. However when I'm accessing the req.user, I'm getting an error Property 'id' does not exist on type 'User'.ts(2339). Here is my ...
Raymond's user avatar
  • 105
1 vote
1 answer
463 views

This expression is not constructable error passport google oauth nodejs

I'm trying to integrate with my NodeJS api developed in typescript with google Oauth2 through passport, but following the documentation that is in javascript, I have an underlined error in ...
Routfin's user avatar
  • 447
0 votes
1 answer
863 views

req.user is undefined, using typescript

i am new to typescript and i am working on an Oauth2.0 project with passport, the req.user returns undefined and i dont know why, here is my code. function checkLoggedIn(req: Request, res: ...
Nasiru Ismail's user avatar
0 votes
1 answer
316 views

500 Internal Server Error in passport-facebook-token implementation using Node.js and express.js

I'm implementing facebook-auth using https://www.npmjs.com/package/passport and https://www.npmjs.com/package/passport-facebook-token npm packages this is my code in the passport config file: passport....
H_POYA's user avatar
  • 1
1 vote
0 answers
961 views

CORS error in Typescript/NodeJS | don't recognize server config

i've been searching data to resolve this but it's been more than a week and don't understand why this didn't work. i'm trying to do a google login in react 18. If i hard-code Browser and disable CORS, ...
Stressed Developer's user avatar
1 vote
0 answers
736 views

Nest.js Passport.js Google conflicts with Apple

I have created auth for application by google (passport-google-oauth20) and apple (passport-appleid). When i try to invoke GET google-sign-in, I have the following error [Nest] 987 - 07/22/2022, 9:...
Orest Mirko's user avatar
2 votes
0 answers
559 views

TypeORM: Access property with select:false inside class method of entity

I am building an application in Typescript using TypeORM, Express and Passport for authentication. I have defined a user model in TypeORM within the file entities/User.ts. The password field is ...
lightningbolt6's user avatar
1 vote
1 answer
2k views

Error: Cannot find module "src/auth/guards/jwt-auth.guard.ts" despite nothing even looking for it

I'm seeing the mentioned error, with stack trace below Error: Cannot find module 'src/auth/guards/jwt-auth.guard' Require stack: ~/Documents/Code/nestjs-passport-learning/dist/src/user/user.service.js ...
richard12511's user avatar

15 30 50 per page
1
2 3 4 5 6