Skip to content
This repository was archived by the owner on Mar 22, 2022. It is now read-only.
This repository was archived by the owner on Mar 22, 2022. It is now read-only.

Features/RFC #213

Closed
Closed

Description

@justingreenberg

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 :)

Activity

  1. marshallswain commented on May 24, 2016

    @marshallswain
    Member

    @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 socket.io and Primus keep a list of connected users, which is used here: https://github.com/feathersjs/feathers-socket-commons/blob/e357f8d7d98f5ec11d9c687d1cba51899079852f/src/events.js#L79
    and passed from here: https://github.com/feathersjs/feathers-socket-commons/blob/e357f8d7d98f5ec11d9c687d1cba51899079852f/src/index.js#L15. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions