Coder Social home page Coder Social logo

Comments (4)

ekzhang avatar ekzhang commented on July 29, 2024 1

I can confirm I am having the same problem. Did you ever figure out the issue?

It appears to me that the UserController's "me" action isn't being called for some reason, even if you route it directly. I've tried calling "sails.log.info()" in the "me" action, and nothing is being logged. I've also tried editing the response passed in to res.ok(), and that didn't change anything either.

from sails-auth.

smyth64 avatar smyth64 commented on July 29, 2024 1

I found a solution!
Use this:
https://github.com/langateam/sails-permissions

Just use the files from sails-permission code!
I had problems using sails-auth only, but now everything works like charm :)

(even /user/me) ;)

from sails-auth.

smyth64 avatar smyth64 commented on July 29, 2024

Got the same problem =/

from sails-auth.

movehand avatar movehand commented on July 29, 2024

+1
In my case, deserializeUser is never called. So the user object is not attached to req.user.
Adding the passport policy for UserController in config/policies.js will invoke deserializeUser, and the user will then be attached, but I'm not sure whether if this is the right way to do it.

In config/policies.js:

UserController: {
  me: ['passport']
}

from sails-auth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.