Most voted "passport-js" questions
Passport.js is an authentication middleware for Node.js. Use this tag for questions related to your usage, features, and implementations.
Learn more…18 questions
Sort by count of
-
10
votes1
answer361
viewsPassport Session authentication on Android
I have a web app running with Nodejs, Express and Passport-JS authentication, and everything works perfectly. Now I’m developing an Android app and need to authenticate my users using the same API.…
-
5
votes1
answer1429
viewsHow to use the Node Passport.js to login against the database
How to use Passport.js to control access using the express.js database and middleware. How to do login logic and how to know that the session is already authorized when the user has already logged…
-
3
votes1
answer401
viewsEmpty input after submitting form
Hello, I am developing a login system, but I would like to improve something. When I register a user, and type his name, address, etc., and request the form, he returns all empty inputs. As in the…
-
1
votes2
answers482
viewsAuth rules with Nodejs + Passport + Mongodb
Let’s doubt it. I’m using a blog as an example. I have the Administrator. He does a complete CRUD within the system. Besides it I have the Editor and Reviewer. The Editor creates blog posts but does…
-
1
votes1
answer221
viewsPassport-local and Passport always returns false
I’m using Passport and Passport-local to authenticate with Nodejs, but the req.isAuthenticated method always returns me false, not even serialize when I log in. I tried to put a req.login() but then…
-
1
votes1
answer62
viewsWhat is the "done" function in Passport for?
I have begun to learn the local authentication form with passport-local, provided by Passport, and I was left with doubts regarding the usefulness of the function done within the authentication…
-
1
votes2
answers7102
viewsTypeerror: Extractjwt.fromAuthHeader is not a Function
I’m having some problems with Passaport.js. When I try to run my api, the terminal returns an error. I went to the file in question and found nothing wrong. I did a web search, but the solutions I…
-
1
votes1
answer132
viewsPassport forwarding error with express 4
I am having problems after user authenticate in form. Passport redirects to the root again, however it does not pass to the express GET of the route '/' and displays [Object Object]. If use…
-
1
votes0
answers60
viewsHow to get the X-Forwarded-For (IP) header from Passport
I’m using express to create route for my application. To login I have a route to authenticate using Passport and Passport-local. I need to compare the user access IP with the IP of the user that was…
-
1
votes0
answers56
viewsJWT and Passport returns 401 React
good afternoon. I am learning JWT and Passport and I am facing problems with the same, the problem is the following, I can log in and save in Localstorage, and redirect to another page however, even…
-
1
votes2
answers55
viewsGET request equivalent in separate files (controller and route)
Good night! Working on a project, and on the login screen after performing the authentication (Passportjs), the user will be redirected to the home page. However, a little while ago I started to…
-
1
votes0
answers22
viewsnodejs + oracledb Undefined result
I need help with a Function no nodejs. oracle js file. const oracledb = require("oracledb") const dbconfig = dbConfig = require('../database/dbconfig.js'); oracledb.getConnection({ user :…
-
0
votes1
answer509
viewsHow to validate a token?
I have an api in Passport, in my front end that is in React I created a private route, in this private route I called a function checkAuth, to know the user ta authenticated, but for now I made this…
-
0
votes1
answer768
viewsGet the logged-in user id of a nodes.js session
I am using the Passport with Session and need to get the user id of a session. I tried to use: router.get('/', (req, res) =>{ execSQLQuery('SELECT * FROM users WHERE id=' + req.user.id, res); })…
-
0
votes2
answers70
viewsPassport-local / I don’t understand the structure of the function
I am trying to implement the authentication system on my platform using Passport, Passport-local and Passport-local-Mongoose. I was able to apply login authentication: app.post("/login",…
-
0
votes0
answers46
viewsPassport.js local Strategy returning error 'Missing credentials'
I am trying to make a login system (authentication) using the Passport and the Express. However, it always goes back to the log page and returns the error Missing Credentials, I have tried to search…
-
-1
votes1
answer60
viewsKey file Permissions are not correct, should be 600 or 660 Instead of 644
The error returned is as follows: Key file Permissions are not correct, should be 600 or 660 Instead of 644 Can anyone help me solve this error ? I know I have to change to 600 or 644 , but I do not…
-
-1
votes1
answer28
viewsPassport js error in Node
I am trying to log in my application with Passport but am encountering the following error: Referenceerror: Cannot access 'Passport' before initialization. At object. (C: Users Claudio Desktop new…