Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Oct 26, 2019. It is now read-only.

Revamp authentication #173

Merged
merged 13 commits into from
Feb 6, 2018
Merged

Revamp authentication #173

merged 13 commits into from
Feb 6, 2018

Conversation

goto-bus-stop
Copy link
Member

Depends u-wave/core#187

  • Now supports using HttpOnly cookies (not accessible with client js = more secure)
  • Use passport for authentication; means we can add different authentication methods more easily. Do GET /auth/strategies to list available methods
  • Add Google social signin (configure using config.auth.google)
  • One-time-use random authentication tokens for the socket, instead of sending the JWT. Do GET /auth/socket to get a socket token; one is also included in GET /now for convenience. In the future this will allow to associate sockets with (WIP) u-wave-core sessions.
  • Add logout endpoint; necessary for HttpOnly cookies sessions. It can also be used by non-cookie users for fast-track signout (instantly removes their authed websocket connection instead of first turning it into a LostConnection)
  • Transform WebSocket connections back to GuestConnections when the user signs out; clients no longer need to reconnect manually to sign out of the socket.

Need to add ability to match social logins with existing accounts. A single user can already have multiple Authentications so it should not be very difficult; maybe, if req.user is already available when you social-login, we add the authentication to the existing user.

@goto-bus-stop goto-bus-stop mentioned this pull request Feb 4, 2018
4 tasks
@goto-bus-stop goto-bus-stop merged commit 46f59af into master Feb 6, 2018
@goto-bus-stop goto-bus-stop deleted the social-login branch February 6, 2018 15:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant