Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

Express-session and passport issue - session ID is changing when it should not

The TLDR is: what would cause a cookie's sessionID to mismatch the sid saved to my database? I am updating my ExpressJS application from NodeJS 16 to 22, along with all modules I'm using. I use ...
Son of Arathorn's user avatar
0 votes
1 answer
27 views

Cookie issues with Passport: why are cookies not sent/stored?

I'm struggling while implementing authentication in my Express application using Passport.js. First of all here are all my packages' versions and my config: "passport": "^0.7.0", &...
AkaMirai9's user avatar
0 votes
0 answers
11 views

Vite React Proxy Requests to Backend in Production

As I implement passport's Google OAuth2.0 strategy, I realized I need the callback to hit the server, then from there, I can redirect to a different page depending on if the user needs to finish ...
LUKER's user avatar
  • 532
0 votes
0 answers
36 views

Google OAuth not requesting calendar.events scope in Node.js with Passport.js

I’m using Passport.js with Google OAuth 2.0 in my Node.js app to authenticate users and request access to Google Calendar events. Despite adding the calendar.events scope in both my Passport strategy ...
sayan chakrabortty's user avatar
0 votes
0 answers
47 views

Jwt gives error for invalid: signature, but is not invalid

I'm having an error where after the user logs in, I create an access token and a refresh token, the access token works, and is practically the same as the refresh, it doesn't give an invalid: ...
John Holanda's user avatar
1 vote
0 answers
50 views

Passport JWT Unauthorized in node js and angular

I am using passport jwt with node and Angular. it is throwing unauthorized error. I have tried with many solution on other stackoverflow questions but nothing works. I am using sequalize with MySQL ...
Prasad Gavande's user avatar
0 votes
0 answers
25 views

passport.js + Google: automatically redirect to login page if user is not authenticated

I use passport.js to log in with Google account to my web app. There is a login button if the user clicks on it then they can choose a Google account to log in, it works fine. What I want is if no ...
Viktor's user avatar
  • 1,487
0 votes
0 answers
16 views

keepSessionInfo for passport.js not working for versions 0.7-0.6?

Any calls made to my passport.authenticate() middleware deletes and recreates my req.session object. I need it to stay consistent because it's shared with my socket.io connection. After some digging I'...
chron1cle's user avatar
0 votes
0 answers
39 views

Nestjs, passport refresh access token strategy, graphql context

I use nestjs with graphql and passport with fastify adapter. I try to implement refresh token logic as additional logic to local strategy. My problem is: when i set passReqToCallback to true, in my ...
vladbelozertsev's user avatar
0 votes
0 answers
30 views

How to Update Google OAuth2 Integration for Social Login After Google’s Policy Changes?

I was previously using passport-google-oauth20 in my Node.js application to handle Google social login. Here's a snippet of my implementation: const login_passport = require('passport'); const ...
khem K's user avatar
  • 9
0 votes
1 answer
34 views

Jest mockImplementation doesn't appear to override initial mocked module's function

I am testing a fairly simple node API endpoint: import { getRaces } from '@/services/races'; import { Request, Response, Router } from 'express'; import passport from 'passport'; export default (app: ...
mealeyst's user avatar
0 votes
0 answers
7 views

How to create custom response logic on passport.authenticate fail state?

my frontend is a React S.P.A. (Single Page Application). Therefore, when passport.authenticate('local') results in a failure, I do not want to use 'failureRedirect' because I do not desire a redirect. ...
chron1cle's user avatar
1 vote
0 answers
11 views

User data not stored in session with passport.js

I try to run authentification with passport.js 1. I configure the sessions app.use(session({ ...sessionConfig, ...{ cookie: { secure: isProduction }, store: sessionStore } })); Sessions work fine 2. ...
Porteurs Libres's user avatar
1 vote
0 answers
45 views

Fastify Passport LocalStrategy: Error 'Expected a string or Buffer' when accessing protected route

I'm implementing a Fastify authentication system using @fastify/passport with a LocalStrategy. Below is the auth plugin that handles user serialization, deserialization, and the local strategy ...
semnmrr's user avatar
  • 11
0 votes
0 answers
11 views

Session expiring when redirecting users to account linking

I’m using Express.js with Passport.js for user authentication and Whoop OAuth integration. My session is being lost when I visit the /auth/whoop route, which initiates the OAuth flow. After ...
FlamingHotDog's user avatar

15 30 50 per page
1
2 3 4 5
461