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

Why does my Express.js server crash when using nodemon, and fail silently with node server.js?

I am developing an Express.js application with PostgreSQL and Passport.js for authentication. When I try to start my server, it crashes or fails to start: Using nodemon, I get this error: [nodemon] ...
이도헌's user avatar
0 votes
2 answers
42 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,...
Brian Michael Berrelez's user avatar
0 votes
0 answers
24 views

Configuration of Keycloak and Passport on a Nestjs Project

CONTEXT: we have a project based on Docker Containers, front and back are done with their dockerfile, that are called in the compose.yaml (we have 3 dir, front, back and infrastructure (where compose....
Dev11's user avatar
  • 1
0 votes
0 answers
20 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 ...
C. Peck's user avatar
  • 3,711
0 votes
1 answer
129 views

Microsoft Entra Id authentication with PassportJs

I have a website whereby I wish to authenticate users with Microsoft Entra Id (formerly Azure Ad) However, I've found that the "out of the box" way that Entry Id authenticates is a bit ...
Darren Gates's user avatar
0 votes
1 answer
30 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://...
Yasas Lekamge's user avatar
0 votes
0 answers
30 views

passport.authenticate is not working - LinkedIn OAuth

I have been trying to implement linked OAuth with passport.js, but I keep getting the message the application is disabled I have rechecked the code multiple times but can't find anything wrong with ...
Margaret Maina's user avatar
-1 votes
0 answers
27 views

Nest.js Auth and Passport.js

So basically I am making a Restful api for my project I just started Nest.js and so far I am liking it. I like the file system and docs are lovely , also as a beginner would it be helpful to use ...
Neva's user avatar
  • 1
0 votes
0 answers
26 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 ...
Abdulbasit Yusuf's user avatar
0 votes
0 answers
18 views

Can't delete an user session from Prisma database in a Node.js back-end through a react front-end

I have a back-end function to logout and delete session in Prisma database. const logout = (req, res, next) => { req.logout((err) => { if (err) { return next(err); } req....
João Vitor de Oliveira's user avatar
0 votes
0 answers
30 views

"failed to fetch user profile" Error While Authenticating LinkedIn in Passport JS OAuth2

I'm having following error while authenticating LinkedIn in Passport JS. { "message": "LinkedIn authentication failed", "error": "failed to fetch user profile" }...
Fuaad's user avatar
  • 432
0 votes
0 answers
20 views

"Unknown scope "r_email"" Error While Authenticating LinkedIn in Passport JS OAuth2

I'm having following error while authenticating LinkedIn in Passport JS. {"message":"LinkedIn authentication failed","error": "Scope "r_emailaddress&...
Fuaad's user avatar
  • 432
0 votes
0 answers
29 views

How to pass query parameter to Google strategy passport nestJs

Ok, so I am trying to pass a query parameter from my mobile app as /auth/google?purpose=addPlatform to my backend so that I can do stuff with that. Right now is not picking up the parameter. I am ...
chewie's user avatar
  • 577
0 votes
1 answer
99 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 ...
Scripter9700's user avatar
0 votes
0 answers
43 views

NestJs: Setup passport strategy for Linked authentication using OpenId

I am trying to setup "Sign In with LinkedIn using OpenID Connect" in my nestjs application. I tried to setup using passport-linkedin-oauth2 but was always getting you dont have access to ...
user3479754's user avatar
0 votes
1 answer
41 views

Error: Unknown authentication strategy "google" in Passport.js OAuth Setup

I'm trying to implement Google OAuth in my Node.js application using Passport.js, but I keep getting the following error when accessing the /auth/google route: Error: Unknown authentication strategy &...
Krishnadev. V's user avatar
-1 votes
1 answer
27 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 ...
Pakshal Shah's user avatar
0 votes
0 answers
17 views

Passport.js session returns undefined for req.user in TRPC-context

I'm using Express.js with Passport.js for user authentication in my Vue 3 app. My session setup uses express-session and cookie-parser to store session cookies. While the authentication works, when I ...
silj6's user avatar
  • 1
0 votes
0 answers
24 views

Mocking passport.authenticate behaves inconsistently between tests in Jest

I am trying to test an Express.js route in a Node.js application using Jest, where I mock passport.authenticate. Each test requires a different mock implementation of passport.authenticate, but the ...
Smit Patel's user avatar
0 votes
0 answers
68 views

How to Use Google OAuth Access Token to Open an Authenticated Google Maps Session Using Playwright

I am working on a Node.js application that uses Playwright to automate interactions with Google Maps. The goal is to use a previously obtained Google OAuth access_token and id_token to open a browser ...
Messaoud Med Yassine's user avatar
0 votes
0 answers
13 views

Terminal Showing a Prisma Error In PERN App

Error Argument `user` is missing. set(): PrismaClientValidationError: Invalid `this.prisma[this.sessionModelName].create()` invocation in /home/muhammed/Desktop/cloud-nest/cloud-nest/node_modules/@...
Mhmd's user avatar
  • 11
1 vote
0 answers
25 views

how do i verify user using oauth 2 after redirect in callbackURL how to send my session data to frontend

Here is backend....in localhost:3000 import { Router } from "express"; import passport from "passport"; import "../stratergies/DiscordStratergy.js" const router = Router(...
Shubham's user avatar
  • 29
0 votes
0 answers
27 views

401 Unauthorized and req.user Undefined After Deployment (Local Works Fine)

0 I have a MEVN app using Passport.js for authentication. Everything works fine when both the server and client are running locally. However, after deploying one or both the server (on Back4App) and ...
Faruq Alawy Hudaya's user avatar
0 votes
0 answers
32 views

Issues with connect.sid Cookie Disappearing in Production After Enabling CORS

I'm experiencing an issue with the connect.sid cookie in my Express application. Everything works perfectly in my local environment, where the cookie is created and persists as expected. However, once ...
Ajay Kumar Gupta's user avatar
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'); ...
Yoosaf Abdulla's user avatar
0 votes
0 answers
31 views

getting 403 forbbiden error for linkedIN oauth 2.0

My react code import React, { useState, useEffect } from 'react'; import axios from 'axios'; import 'bootstrap/dist/css/bootstrap.min.css'; function App() { const [profile, setProfile] = useState(...
Prashant Jani's user avatar
0 votes
1 answer
32 views

express-session production latency issue with passport.js and render.com

It works in localhost, but in production the authentication is quite slow and takes at least a few seconds so the user still sees the 'login' page and then it magically 'jumps' to the site. The app is ...
Yafim Simanovsky's user avatar
0 votes
0 answers
29 views

Why I need to use passport JS

For example I have RolesGuard: import { CanActivate, ExecutionContext, ForbiddenException, Injectable, UnauthorizedException } from '@nestjs/common'; import { Reflector } from '@nestjs/core'; import { ...
Морфей's user avatar
0 votes
1 answer
26 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 ...
Callum's user avatar
  • 13
0 votes
0 answers
28 views

Can't set cookies with passport google oauth

I am using Passport's GoogleAuth2.0 to login. I can login successfully but in callback function can't set any cookies. This is my callback function after authentication : exports.googleCallback = (req,...
Yunus Emre Tosun's user avatar
-2 votes
1 answer
68 views

passportjs + googleoauth20 + express-session (valkey store optional) req.user undefined

I'm so tired i spent the whole day trying to fix it but no matter what i do it's not working all i get is undefined PLEASE PLEASE HELP!!!! The Problem is that I'm getting req.user property as ...
Parag Yadav's user avatar
0 votes
0 answers
26 views

Issues Retrieving User Email with Google OAuth 2.0 in Passport.js Integration

I’m encountering an issue with retrieving the user's email address during Google OAuth 2.0 authentication using Passport.js. Despite configuring the appropriate scopes and ensuring that the email ...
Ajay Kumar Gupta's user avatar
0 votes
1 answer
60 views

Is this a valid approach to password reset

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 ...
Ed Lynch's user avatar
  • 615
1 vote
1 answer
31 views

Passport JS authenticates if the user goes back on navigation history even without selecting account

When the user have logged In the app before(gave consent), in the next time while logging in the user can be authenticate without even selecting the account. How to prevent it? Bug occurs on step 2: ...
Shane O Neil's user avatar
0 votes
0 answers
72 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 ...
Meenic's user avatar
  • 3
0 votes
0 answers
20 views

Problems with React Native Google Sign-in With Passport in NodeJS API

I have a NodeJS API that handle user authentication with username/password and google. Both work perfect on web browser or postman, but i cant make it work in react native. Here's the code that handle ...
Luciano655's user avatar
0 votes
0 answers
17 views

facing an error in fetching data of the user after login-in using passport-google-Oauth

Failed to load resource: the server responded with a status of 404 (Not Found) this is the error I am getting i have checked the Google Cloud console my auth.js, and index.js and I am using passport ...
MOHAMMED DHINOJWALA's user avatar
1 vote
0 answers
18 views

What is the actual use of local guard on a login route in nest js, that under the hood is using auth service which generates token on correct match?

[AuthController code](https://i.sstatic.net/TpKVgh6J.png) [Localstrategy code:](https://i.sstatic.net/EdFhToZP.png) [Auth service code:](https://i.sstatic.net/gYA5LJSI.png) [Jwt strategy code](https://...
Aditya Raj's user avatar
1 vote
1 answer
93 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: ...
Edison Biba's user avatar
  • 4,403
1 vote
0 answers
51 views

OAuth working on localhost and production in Chrome, but not Firefox / Safari

I am quite new to web development, so please bear with me! I have deployed a React application (famtivity.fun) via Netlify with my backend hosted on Heroku (here). Initially, Oauth for Google / Github ...
Lindsay Renna's user avatar
0 votes
0 answers
24 views

Passport.js Error Handling Instead of throwing the error into stdout

So I Have The Current Code For Authorization (and im probably going to merge login with signup): Strategy: const passport = require("passport") const { Strategy } = require("passport-local") const ...
AmirparsaDD's user avatar
1 vote
0 answers
17 views

How to implement login and registration module in node and react with passportjs

I want to know like there is a three pages login registration and home now I want like before signup or sign in user should not be able to access home page now how to implement that like normally and ...
techguy's user avatar
  • 11
0 votes
1 answer
38 views

passport.deserializeUser function never getting called

Passport's deserialization just does not work no matter what I do. This is my passport.js: const passport = require('passport'); const GoogleStrategy = require('passport-google-oauth20').Strategy; ...
hypedstan's user avatar
-1 votes
2 answers
34 views

Passport JS + React application internal 500 errro

I am creating a general chat application with react, and am stuck while trying to authenticate a user. The axios post request raises a 500 error that I cannot track anywhere. When I put in correct ...
Mac Pickle's user avatar
0 votes
0 answers
35 views

NPM passport issue

I am using NPM package passport router.get("/login", (req, res) => { res.render("users/login.ejs"); }); router.post( "/login", (req, res) => { ...
Sparsh Maheshwari's user avatar
0 votes
1 answer
35 views

Login Redirection Issue in Express.js with Passport Authentication

I am developing an Express.js application and facing a persistent issue with user authentication. Despite successful user registration and confirmed entries in the database, the login process does not ...
Ricardo Luna's user avatar
0 votes
1 answer
203 views

How to redirect to a specific path after authentication in Nest using Passport

I have an API backend implemented using Nest, and the app frontend is implemented using Angular. It implements authentication using Passport. The Angular app runs at http://localhost:2080, whereas the ...
Umar Farooq Khawaja's user avatar
0 votes
0 answers
16 views

Passport.js { message: 'Missing credentials' } error in Next.js

So I tried making the passport.js local strategy in Next.js using it's pages router (the app router can't work because NextResponse doesn't contain an .end() method like NextApiResponse). I have been ...
MD20M's user avatar
  • 1
0 votes
0 answers
29 views

Why is my Google social login working despite my app not being published?

I have implemented Google social login for my web application. Here are the steps I've taken so far: Created an OAuth 2.0 Client ID in the Google Cloud Console. Added my application's domains under &...
khem K's user avatar
  • 11
0 votes
0 answers
43 views

passport login issues in session

I'm having trouble with my passport. The login process went through without any issues, but the passport key has to be saved into the session and there is not req.user in the requset the initapp ...
Yossef Sabry's user avatar

1
2 3 4 5
139