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

registered many authentication services #634

Closed
sarkistlt opened this Issue Feb 2, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@sarkistlt
Copy link

sarkistlt commented Feb 2, 2018

Right now I'm getting error:

Error: You have already registered authentication on this app. You only need to do it once.

us it possible somehow register more then one? like so:

  .configure(auth(app.get('auth')))
  .configure(auth(app.get('authCustomers')))
  .configure(auth(app.get('authAdmins')))
...

and each will have separate endpoint and service.

@daffl

This comment has been minimized.

Copy link
Member

daffl commented Feb 2, 2018

That is currently not possible. To me this looks like just different types of users which can be much easier handled by adding a type property to them.

If things are in different services I usually recommend to create an entity service for authentication that then links to the appropriate other service (users, machines, customers) through fields like userId, machineId, customerId.

@sarkistlt

This comment has been minimized.

Copy link
Author

sarkistlt commented Feb 2, 2018

different types make sense, but what if those users in different tables in db. anyway I think entity service should solve this problem, thanks.

@sarkistlt sarkistlt closed this Feb 2, 2018

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.