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

Support authenticating with Username and Password via sockets #32

Closed
ekryski opened this issue Jan 25, 2016 · 4 comments
Closed

Support authenticating with Username and Password via sockets #32

ekryski opened this issue Jan 25, 2016 · 4 comments
Milestone

Comments

@ekryski
Copy link
Member

ekryski commented Jan 25, 2016

Currently we only support authentication via sockets once you have your JWT. We should support being able to send the username and password attributes via sockets and receive a JWT in response.

@daffl
Copy link
Member

daffl commented Jan 25, 2016

That was one of the things I started on when looking into oAuth. The authentication routes (see https://github.com/feathersjs/feathers-authentication/blob/master/src/index.js#L41) should probably simply be their own service. That way we'd get SocketIO authentication for free. /cc @marshallswain

@marshallswain
Copy link
Member

That's how I discovered this stuff about trading an unauthenticated socket for an authenticated one:

socket = io('', {
  // Assuming you've already saved a token to localStorage.
  query: 'token=' + localStorage.getItem('featherstoken'),
  transports: ['websocket'], // optional, see below
  forceNew:true,             // optional, see below
});

@marshallswain
Copy link
Member

Sounds good. Keep #33 in mind.

@ekryski ekryski modified the milestone: 1.0 release Feb 2, 2016
@ekryski
Copy link
Member Author

ekryski commented Feb 7, 2016

This is done in the decoupling branch.

@ekryski ekryski mentioned this issue Feb 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants