6,858 questions
0
votes
0
answers
57
views
graphql passport js how to get isAuthenticated() to work
My tech stack is node js, react, graphql, @apollo/server graphql-passport connect-mongodb. The authenticate from passport is working because I login and when I console log from the user resolver I get ...
1
vote
1
answer
56
views
How can I retain Express Session + Passport Session in Node.js?
I am trying to integrate Steam accounts into my project, by linking them through passport-steam module.
My app is also using express-session, in order to authenticate signed in users.
const session = ...
1
vote
1
answer
48
views
Integrating wiremock with node for google oauth flow
I am trying to mock google oauth flow with wiremock in my nodejs app for integration tests.
I have configured in my passport manager code:
passport.use(new GoogleStrategy({
clientID: config....
0
votes
0
answers
34
views
issues with google oauth2 access token
So i am new to programming so pardon me. I am building a blog app with ejs and node js that has a google sign in functionality through passport js.. the functionality works, however when i click on ...
0
votes
0
answers
30
views
Pass key project
I'm trying to implement a passkey in my project.. but when I try to sign up I always get a 403 response back... I'm not able to solve it since 2/3 hours... could you please maybe help? if I debug I ...
0
votes
2
answers
62
views
configService in JwtStrategy constructor is undefined
I can't understand why configService is undefined in constructor of jwt.strategy.ts until I add @Inject(ConfigService) decorator before readonly configService: ConfigService, but in other modules ...
0
votes
1
answer
104
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",
&...
0
votes
0
answers
72
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 ...
1
vote
0
answers
59
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 ...
0
votes
0
answers
100
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'...
0
votes
1
answer
45
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: ...
1
vote
0
answers
13
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. ...
0
votes
0
answers
17
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 ...
0
votes
0
answers
32
views
Why does installing @types/passport-google-oauth20 cause type conflicts with my custom Request interface in Express?
I am working on an Express application where I need to extend the Request interface to include custom properties for user and admin. Here's my custom interface:
This setup worked fine until I ...
0
votes
2
answers
156
views
OAuth2 Validating tokens on backend when using multiple providers
I'm quite new to using OAuth2 and was wondering how do you validate access tokens that multiple providers?
I have a front end server that is allowing authentication from multiple provides (e.g, Google,...
0
votes
0
answers
25
views
Testing passport.js login with selenium in CI fashion
I have a set of existing selenium (Selenium Webdriver 4, python) tests for a website that will henceforth be authenticated with passsport.js google oauth2. I want to continue automating the end-to-end ...
0
votes
1
answer
47
views
How to pass data to multiple database tables in NodeJS using google OAuth?
passport.use("google",
new GoogleStrategy(
{
clientID: process.env.GOOGLE_CLIENT_ID,
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
callbackURL: "http://...
0
votes
0
answers
33
views
Handling Incorrect Password or Username in Passport-ActiveDirectory Validate Function
I am creating a REST API using Nestjs and as part of authentication i needed to authenticate a user against my company active directory, I was able to use `passport-activedirectory' strategy to ...
0
votes
1
answer
401
views
Implementing Microsoft SSO with passport-azure-ad and without msal
I want to implement SSO sign up/sign in for Microsoft Azure AD B2C in NodeJS however, I want to create the user using Graph API. I'm using passport-azure-ad strategy. The process has to be custom ...
-1
votes
1
answer
40
views
OAuth 2.0 Spotify InternalOAuthError
InternalOAuthError: failed to fetch user profile
at C:\Users\PAKSHAL\Documents\Pakshal\Projects\Saarang\backend\node_modules\passport-spotify\lib\passport-spotify\strategy.js:151:19
at ...
0
votes
1
answer
24
views
Node.js not persisting redirect URL in session variable set in middleware
app.js
const express = require('express');
const chalk = require('chalk');
const app = express();
const debug = require('debug')('app')
const path = require('path');
const morgan = require('morgan');
...
0
votes
1
answer
43
views
passport js google getting original request param in callback
I'm attempting to get a url param /api/sso-login/google?mobile=true in the callback function. However the req returned is for the google auth and not the original request to the server. I have ...
-1
votes
1
answer
66
views
Is this a valid approach to password reset [closed]
I'm currently building a password reset flow and wanted to check this made sense.
So the user would make a request passing their email which would generate a token, this would be sent to the user and ...
0
votes
0
answers
86
views
Duplicate Session Entry and Missing Session Support
I'm building a Discord bot dashboard API using NestJS, Passport, and TypeORM for session management. When a user attempts to log in through Discord, I encounter two errors:
[Nest] 19524 - 09.08.2024 ...
2
votes
1
answer
108
views
NestJS multitenancy with Passport JWT not working, Request object is undefined
I have created a multitenant app in NestJs using a connection factory where we inject a connection for each request. I have spent several days debugging this but no luck till now.
Github repository: ...