All Questions
237
questions
1
vote
0
answers
25
views
Cross-domain Authentication Issue with Passport.js and Next.js Client
Problems
I'm using Passport.js for authentication on a Node.js server (localhost:8000) and a Next.js client (localhost:3000). Despite trying various solutions, I can't get cross-domain authentication ...
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
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 ...
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 ...
1
vote
0
answers
21
views
About the deserializeUser function not running in the passport library
I have an application that is currently being developed.
The front end is running at localhost:3000 and the back end is running at localhost:4000.
When I tried to log in, I successfully checked the ...
1
vote
0
answers
18
views
nodejs and heroku and passport does not initialise the cookies in production
I am using nodejs and react with passport. I am using the following config in backend:
app.use(cors({
origin: getProductionURL(),
credentials: true}));
//Dong know whats this but without it ...
1
vote
0
answers
29
views
Using passport.js, my authentication and redirection to desired URL fails
I am relatively new to JavaScript and aim to learn it not just through tutorials but also through projects.
This is the first time I have attempted to create a website with user signup and login, ...
0
votes
0
answers
17
views
req.session doesn't reflect updated flash messages from the database 🥲
I am using express-session, express-flash, and Passport.js for my authentication system. I want to send a flash message to the client when the authentication fails, but it seems that there is a ...
0
votes
1
answer
515
views
NESTJS EXPRESS-SESSION REDIS: cookie per user
I have a NestJs app with PassportJs, Express-Session and Redis as session storage. Actually, I'm trying to implement a remember-me feature and I'm facing a problem and can't see why it's not working. ...
0
votes
1
answer
40
views
Passing accessToken obtained from github callback function across routes
I have three files,
Auth.js
passport.use(new GitHubStrategy({
clientID: GITHUB_CLIENT_ID,
clientSecret: GITHUB_CLIENT_SECRET,
callbackURL: "http://localhost:3000/auth/github/...
4
votes
3
answers
950
views
Session cookie not saving after app deployment
I created a frontend application using React which I then deployed on Netlify. The frontend app interacts with my express backend application which I created and deployed to Render. Any interaction ...
0
votes
1
answer
367
views
How does session based authentication work since we can't share cookie between different domains?
I used google authentication in my MERN stack app using passport js. I have deployed frontend to vercel and backend to render. in my localhost, I can log in successfully and it returns cookies to my ...
2
votes
1
answer
368
views
passport.authenticate() middleware removing all the session keys
I am storing the url in a returnTo key in the session and it persists in the session as long as the passport.authenticate() middleware is not called, after calling this middleware my session keys are ...
0
votes
1
answer
362
views
Express doesn't set-cookie when SameSite is none
I have read a lot of other similar questions, but I couldn't solve the issue.
My setup is Node + Express + PassportJs and everything works in development, but I have problems on production.
With the ...
2
votes
1
answer
594
views
req.isAuthenticated is not a function while using Express and passport
in the last few hours I setup a backend express server. It works just fine and now I tryed to implement an authorization with help of a tutorial.
The login works, but when I try to open /authrequired (...