All Questions
Tagged with node.js passport.js
5,452
questions
0
votes
1
answer
29
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 ...
0
votes
0
answers
46
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 ...
0
votes
0
answers
26
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 ...
0
votes
0
answers
30
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 ...
0
votes
0
answers
21
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 ...
0
votes
0
answers
17
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'...
0
votes
0
answers
11
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 ?...
0
votes
0
answers
19
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 ...
0
votes
1
answer
24
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 ...
1
vote
0
answers
15
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 ...
0
votes
0
answers
13
views
Backend says isAuthenticated is true/ frontend says isAuthenticated is false
Im using passport js google oauth20. Upon fetching from the backend and console.logging the data I get false. I'm not sure what's causing this
Frontend
const [isauthenticated, setIsAuthenticated] = ...
1
vote
0
answers
72
views
Credentials problem in Vite.js application (passport.js)
When I send POST request from Vite.js app (localhost:5173) to backend I get correct response but my data doesn't come. I mean My request goes correctly but the data is not coming
Hello, first of all ...
0
votes
0
answers
22
views
passport-google-oauth20 redirect and replace history
I have setup a simple authentication flow with google using passport-google-oauth20.
Basicly I added a separated file to handle the initial configuration like represented bellow:
const GoogleStrategy =...
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 = (....
0
votes
1
answer
24
views
InternalOAuthError: Failed to fetch user profile with Passport.js LinkedIn Strategy
I'm trying to implement LinkedIn authentication in my Node.js application using Passport.js and the passport-linkedin-oauth2 package. After a successful login redirect, I'm encountering the following ...