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

Can't set cookies with passport google oauth

I am using Passport's GoogleAuth20 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
-1 votes
0 answers
21 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!!!! I Uploaded All The code On GitHub https://github.com/Parag-47/...
Parag Yadav's user avatar
-1 votes
1 answer
27 views

CRUD operation problems in NODEJS and MONGODB [closed]

How to prevent duplicate ID and email in mongodb, nodejsand expressjs. and stop registration. also prevent the user from registring twice. Iam just new in nodejs and mongodb i will appreciate if i can ...
Obi Apostle's user avatar
0 votes
0 answers
14 views

Set-Cookie is working in Localhost but not on the deployment

When i use my localhost login endpoint, i can see that Set-Cookie header is working and it is giving me value, but when im using my deployed login endpoint, i cant find the Set-Cookie in the response ...
Christian Sugarol's user avatar
0 votes
0 answers
21 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
47 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
21 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
52 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
18 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
12 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
0 votes
0 answers
13 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
81 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,393
1 vote
0 answers
19 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
23 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
33 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
29 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
33 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
30 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
61 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
14 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
24 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
  • 1
0 votes
0 answers
40 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
0 votes
1 answer
28 views

How do I specify which HTTP method should be used in a redirect in my express application?

I have a NodeJS/Express application where I am using PassportJS for authentication. I have the following routes: router.get("/profile", isUser, (req, res) => { res.render("profile&...
Oscar R's user avatar
  • 514
0 votes
0 answers
34 views

How to Configure Google Auth Redirect URI for a Node.js Application on AWS EC2?

I'm currently deploying a Node.js application that uses Google OAuth 2.0 for authentication on an AWS EC2 instance. However, when users attempt to log in using Google, they receive an "access ...
ASHWIN C's user avatar
0 votes
1 answer
103 views

Getting "401 Unauthorized" when accessing protected route in Express.js with express-session and passport

I'm building a blob web application using Express.js where users can log in and access protected routes. I've set up session management using express-session and authentication with passport-local. ...
elclasico's user avatar
0 votes
1 answer
37 views

Cookie not setting in Express with Passport JS

I am using Passport JS for authentication for my MERN app. I am trying to have routes that are protected so you must be authenticated. When I test the routes and /login in Thunder Client and then try ...
jc22920's user avatar
  • 358
0 votes
1 answer
51 views

Mongoose CastError: Cast to ObjectId failed for Twitter ID (type string)

I’m working on a content syndication project where I’m implementing Twitter authentication using Passport.js and Mongoose. The authentication flow works up to the point of deserializing the user. I’m ...
Belmin's user avatar
  • 1
0 votes
1 answer
46 views

Login route returns "Cannot POST /login" - implementing Passport in MERN

I am trying to implement Passport into my MERN application, registering users and all other routes work but whenever I hit the /login POST route I get Cannot POST /login (see image below). This only ...
jc22920's user avatar
  • 358
0 votes
0 answers
26 views

NODE + PASSPORT + GOOGLE STRATEGY: req.user not being persistent and connect.sid not being sent in production environment

I'm working on a MERN stack project and I'm facing this issue where my req object is not being persistent and holding the req.user after it has been authenticated. when the /google/callback enpoint is ...
Amaan's user avatar
  • 5
0 votes
0 answers
61 views

Google OAuth Refresh Token Undefined

I realize that this has come up several times, but I have tried every solution I could find, and my refreshToken is still coming up as undefined. I make sure that I delete my app's 3rd party access. ...
threehappypenguins's user avatar
0 votes
1 answer
36 views

Express request does not inlcude user after passport (local strategy) authentication

Question: I try to authenticate http requests via username and password. The authentication seems to work. But for some reason the user data is not available inside the express routes. Related ...
quentinkrammer's user avatar
0 votes
1 answer
61 views

CANNOT override Service in NestJS/Vitest

We are implementing e2e testing in an application using NestJS/Vitest/Prisma. I used overrideProvider to Mock ItemsService in my ItemsController test, but it doesn't work. The test code and test ...
uramonk's user avatar
  • 1,232
0 votes
0 answers
32 views

Issue in Authentication using Passport JS

What is the issue? I am signing in and User using Passport JS is stored in mongoDB, but after logging in authentication is failed !! I am using 2 different users (teacher and parent). Is there any ...
Crazy Tiger's user avatar
2 votes
0 answers
71 views

I keep getting 'Something went wrong' using Twitter OAuth 2.0 in NestJS

So first, This is my Twitter Developer User authentication settings: I am trying to use the Twitter passport OAuth2 package provided by @superfaceai in my NestJS backend, I don't mind to change the ...
Abdel's user avatar
  • 552
0 votes
1 answer
32 views

Passport JS and express-session: req.isAuthenticated() false in production , returns true in development

I am responding to request from client for protected resources based on whether the req.isAuthenticated() flag returns true or false I am hosting my app on render When i had completed the initial ...
DaObliterator's user avatar
0 votes
0 answers
72 views

Keep getting TypeError: Cannot set properties of undefined (setting 'user')

I'm new to Nodejs and Express server. I'm trying to create a webapp where user can log in with their Gmail. My front-end uses Reactjs. However, I keep getting this error TypeError: Cannot set ...
user25247436's user avatar
0 votes
0 answers
25 views

Nestjs server automatically reloaded after some period in Vercel Deployment

I uploaded my Nestjs project in the Vercel Deployment. I'm using session in my project, but for some reason the server sends me 401 even though the time was way before than the expire date. I checked ...
J.H's user avatar
  • 13
0 votes
0 answers
39 views

session being overwritten using node js express passport authentication oath2 session for google

Google suggests to ask a user for a minimal set of permission when first signing up a user, and to then ask to extend those permissions when/if needed by the user. So, I have used token based ...
user25295461's user avatar
0 votes
0 answers
39 views

Defining authorization route in Openapi/Swagger for a passport.js Oauth route that returns a cookie

I have an express application that uses passport.js to authenticate. The authentication endpoints use Oauth 2.0, and after all the redirects etc, set a connect.sid cookie which is sent on subsequent ...
Brenden's user avatar
  • 118
0 votes
0 answers
25 views

How do I make sure that the user name remains after the page has been updated?

I implemented verification by using passport-jwt in my back-end and then I made post request from client to server: export const fetchVerifyUser = async (token) => { try { const response = ...
Oleg's user avatar
  • 41
0 votes
0 answers
37 views

nock is not intercepting HTTPS request to Keyclaok

I have been struggling in the last two days to figure out what is not working well with my nock setup. Description: I work with node environment and express as the application server. The ...
Gavriel's user avatar
  • 51
0 votes
0 answers
47 views

Unable to Retrieve Drive Items After Successful Microsoft Drive Authentication

I'm working on a web application and trying to integrate Microsoft Drive using Node.js and Passport. This is my first time working with Microsoft integration. I've set up the authentication process ...
user275472's user avatar
0 votes
0 answers
22 views

React.js Passport.js session and cookie problem

That's my db session also passport.js configuration in index.js file: const connect = async () => { try { await mongoose.connect(process.env.DB_URL); console.log("Connected ...
Nijat Mansimov's user avatar
0 votes
0 answers
22 views

Trouble Obtaining Refresh Token Alongside Access Token from Dropbox OAuth2 in Local Environment

I'm trying to integrate Dropbox into my web application using OAuth2. My code seems to be working correctly, but I'm only receiving the access token and not the refresh token upon successful login. I'...
Benk I's user avatar
  • 199
0 votes
0 answers
155 views

login with google in nextjs with next-auth using google provider in FE with express backend using passport js ( passport-google-oauth20 stategy )

I am building a MERN app where FE is in Nextjs and BE express. I have integrated passport js authentication ( i.e passport-local and passport-jwt) in backend which works fine for credentialsProvider ...
Gopal Adhikari's user avatar
0 votes
0 answers
12 views

can someone explain how serializeuser deserializeuser work here with google login and normal login

why when someone not logged in with google tries to post something the req.user gives the google id only but when its a user thats not logged in with google the req.body gives the id and the username ?...
brazilclouds's user avatar
0 votes
0 answers
21 views

passport serialize/deserialize user google login problem with googleid and normal id

why if a user logged in with google makes a post to secrets the req.user only includes the googleId but when its a normal user it contains all the object stored in the db im trying to use the objectId ...
brazilclouds's user avatar
0 votes
1 answer
31 views

The user registers he's authenticated but cant get to the secret page so it redirects me to the login always

I do not actually know where the problem is but what i think is in either the secrets route or register route. I want in that if the user registers the cookie is saved with the session id and the user ...
ssekalala umar's user avatar
1 vote
0 answers
17 views

passport serialize/deserialize user google login problem

why if a user logged in with google makes a post to secrets the req.user only includes the googleId but when its a normal user it contains all the object stored in the db im trying to use the objectId ...
brazilclouds's user avatar

1
2 3 4 5
140