Skip to main content

All Questions

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 =...
caxinaswin's user avatar
0 votes
0 answers
351 views

Google authentication with passport in node.js. How to generate my own jwt token after successful login?

Here are all the resources I've based to build my solution/strategy for this: https://medium.com/free-code-camp/how-to-set-up-twitter-oauth-using-passport-js-and-reactjs-9ffa6f49ef0 https://medium.com/...
Rafael Santos's user avatar
0 votes
1 answer
55 views

How to set cookies inside passport-google-oauth callback?

I attempted to set a cookie from express app when the authentication of google oauth is successful. I've followed every steps in the documentation and it worked well in development environment. ...
Ngr Wisnu's user avatar
0 votes
0 answers
68 views

PassportJS `logout()` request stuck pending

When calling the passport logout() function to clear cookie session, http request gets stuck pending: I set the routes in auth.routes.ts: router.get('/login', (req: Request, res: Response) => { ...
dashy's user avatar
  • 11
0 votes
0 answers
18 views

failed to fetch data in the passport google oauth20

I have a local strategy and a Google strategy, it's in a different file and has different serialize and deserialize, because they have different Mongo database, my login with Google successfully ...
Arafat Hossain Saikat's user avatar
0 votes
0 answers
22 views

Why am I seeing "bad request" when I run my code using nodemon app.js?

**this is my app.js code: ** import dotenv from "dotenv"; import express from "express"; import bodyParser from "body-parser"; import ejs from "ejs"; import ...
Isabella's user avatar
0 votes
0 answers
33 views

How to resolve 'ERR_HTTP_HEADERS_SENT' Error in Passport Google OAuth 2.0 Authentication?

Expected behavior Upon successful authentication using Google OAuth 2.0 with Passport, I expect the user to be redirected to a successful login route. Actual behavior I'm getting the Error [...
Brian Rey's user avatar
0 votes
1 answer
461 views

Do i need to install express-session every time I use passport nodejs?

Do i need to install express-session every time I use passport nodejs? I was following a tutorial on using Oauth (Google) with Passport.js and Nodejs, The Net Ninja one And He didn't mention express-...
Omar AlHadidi's user avatar
0 votes
1 answer
474 views

Circular redirect issue with Google OAuth2 and PassportJS in a NodeJS project

In my NodeJS project, I'm trying to protect access to certain controllers (since all the routes under the controller would also be protected). When using my front-end, I want to ensure users are from ...
Jason Jacobson's user avatar
0 votes
1 answer
240 views

Passport google authentication is returning [Function: authenticate] instead of google login page

I'm trying to use passport to login with google. So here's how I created my files. Created Passport.js for passport configurations which looks like below, const passport = require('passport'); const ...
Nick's user avatar
  • 761
0 votes
2 answers
79 views

node.js react Error [ERR_HTTP_HEADERS_SENT] when trying to send token using jwtToken with passport google oath2.0

I am currently trying to implement a google authentication using passport google oath2.0 on my node.js react web application with mongodb as database. I am struggling on passing token from google ...
sheynn's user avatar
  • 5
1 vote
1 answer
911 views

No 'Access-Control-Allow-Origin' header is present on the requested resource while using Passport for google authenticate in Nodejs

I am trying to authenticate with google using a passport IN MERN app. Getting the below error but if I open the link available in below error in a new tab I am able authenticate with google. Only ...
Deepanshu Gupta's user avatar
0 votes
2 answers
737 views

Google OAuth 2.0 email missing from profile

I am trying to set Google OAuth 2.0 via Passport. I am developping a node.js using express. Node.js : v18.12.1 When the user hasn't been created yet, I try to create it based on the info provided by ...
Infinite Learner's user avatar
0 votes
1 answer
689 views

Passport.js GoogleStrategy not working! Getting error "Cannot read properties of undefined (reading '0')"

I am trying to implement passport.js google login, but as you can see in my code below I am having an issue with the profile object which is not behaving like the documentation says it should. Please ...
Oscar R's user avatar
  • 452
0 votes
1 answer
37 views

Passport breaking request flow for federated accounts

I have discovered, when using simple Google Tutorial app, that if the user goes to Google, authenticate successfully and then my app cancels this log in (e.g. because this user was not found in the ...
user9128309's user avatar

15 30 50 per page
1
2 3 4 5 6