Skip to content
New issue

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

Check If Authenticated In Middleware #233

Closed
omerfdmrl opened this issue Dec 27, 2022 · 1 comment
Closed

Check If Authenticated In Middleware #233

omerfdmrl opened this issue Dec 27, 2022 · 1 comment

Comments

@omerfdmrl
Copy link

Hi. I want to check if authenticated in new middleware like that;

new-plugin.js

module.exports = async(req, res, next) => {
    if (req.user) { ... }
    next();
};

In app.js I'm using right before then v1 api routes. Auth middleware calling after that middleware. How can I fix that?

@alibabayev0
Copy link

alibabayev0 commented Dec 27, 2022

Hi Ömer, please may you describe more detailed? Please, move your question to discussion and do not create question as issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants