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

Features/RFC #213

justingreenberg opened this Issue May 24, 2016 · 1 comment


None yet
2 participants
Copy link

justingreenberg commented May 24, 2016

hey guys, thank you for the amazing work! i have a few feature ideas for auth module....

  • setLastLoggedIn hook
  • socket presence (current authenticated/subscribed userIds for Resource—must be using sessions)
  • register custom hooks to be run on auth events—onLogin 'onLoginSuccess' etc

is it possible to implement any of above without adding functionality to feathers-authentication?

if not, i'm happy to contribute! the setLastLoggedIn hook is pretty straightforward, would need some direction on socket presence :)


This comment has been minimized.

Copy link

marshallswain commented May 24, 2016

@justingreenberg Sounds great! We would love the help.

I think you could implement the lastLoggedIn on two services. (Related to the third question, you can use hooks on auth services.) I'd put one on the auth/local service as an after hook, and another on the users service, which would probably make the most sense as a before hook for when new login details are being saved to the user during an OAuth login.

For socket presence, both and Primus keep a list of connected users, which is used here:
and passed from here: I'm not sure if it will contain the user information you need, but that's the first place I'd check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.