We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi i am getting this error when i am clicking on Login with google button.
This is the list of dependencies I am using in my project.
"dependencies": { "ejs": "^3.1.6", "express": "^4.17.1", "nodemon": "^2.0.7", "passport": "^0.4.1", "passport-google-oauth20": "^2.0.0" }
node - version : "1.0.0"
app.js file
`const express = require('express'); const authRoute = require('./route/auth_route'); const passportSetup = require('./config/passport-setup');
const app = express();
//using the authRoutes app.use('/auth', authRoute)
app.set('view engine', 'ejs');
app.get("/", (req, res)=>{ res.render('home'); })
app.listen(3000, ()=>{ console.log("Server is now running on port 3000"); })`
passport-setup.js file
`const passport = require('passport'); const GoogleStrategy = require('passport-google-oauth20'); const keys = require('./keys');
passport.use( new GoogleStrategy({ //passport google strategy clientURL:'http://localhost:3000/auth/google/redirect', clientID: keys.google.clientID, clientSecret: keys.google.clientSecret }, ()=>{ //passport callback function }) )`
The text was updated successfully, but these errors were encountered:
Could you post the authRoute code?
authRoute
Sorry, something went wrong.
No branches or pull requests
Hi i am getting this error when i am clicking on Login with google button.
This is the list of dependencies I am using in my project.
"dependencies": {
"ejs": "^3.1.6",
"express": "^4.17.1",
"nodemon": "^2.0.7",
"passport": "^0.4.1",
"passport-google-oauth20": "^2.0.0"
}
node - version : "1.0.0"
app.js file
`const express = require('express');
const authRoute = require('./route/auth_route');
const passportSetup = require('./config/passport-setup');
const app = express();
//using the authRoutes
app.use('/auth', authRoute)
app.set('view engine', 'ejs');
app.get("/", (req, res)=>{
res.render('home');
})
app.listen(3000, ()=>{
console.log("Server is now running on port 3000");
})`
passport-setup.js file
`const passport = require('passport');
const GoogleStrategy = require('passport-google-oauth20');
const keys = require('./keys');
passport.use(
new GoogleStrategy({
//passport google strategy
clientURL:'http://localhost:3000/auth/google/redirect',
clientID: keys.google.clientID,
clientSecret: keys.google.clientSecret
}, ()=>{
//passport callback function
})
)`
The text was updated successfully, but these errors were encountered: