sdelements / lets-chat

Self-hosted chat app for small teams
http://sdelements.github.io/lets-chat
MIT License
9.78k stars 1.58k forks source link

openid auth support #269

Open JohnTheodore opened 9 years ago

JohnTheodore commented 9 years ago

It would be great to use google for you domain, and hook that up to chat.

https://github.com/havard/node-openid

funkaoshi commented 9 years ago

Presumably this would be done as a new plugin. You can see how we implemented LDAP and Kerberos support.

sibartlett commented 9 years ago

It would need to be done as a plugin, but it would be more involved as you need to do a handshake with the OpenID provider etc.

liamdawson commented 9 years ago

I'm writing an azure-ad auth plugin, but I'm unsure of the start and end points:

  1. Have a button instead of a login form which the user clicks, redirecting them into the auth process
  2. Redirect them off into the external auth flow (from /auth/azure-ad/login?)
  3. Receive the callback back at a url (/auth/azure-ad/callback?)

Outside of those things (exposing routes, mostly), I think I can do the rest. Any suggestions on how to neatly accomplish that stuff?

geoffwhittington commented 9 years ago

@liamdawson sounds awesome! Regarding "neatly" - the best way is to show us what's working in a PR and we can comment on it. Do you have specific ideas on how you want to implement it?

liamdawson commented 9 years ago

@geoffwhittington Nothing in particular, I'll draft something up soon-ish(tm) and make a PR. Also going to use OpenID Connect instead, for increased portability.

liamdawson commented 9 years ago

It's taking me longer than I predicted to get to this, so if someone else is looking to do it, don't wait on me.

kingsumos commented 9 years ago

what about using passport.js instead? (to support oauth as well)