-
Notifications
You must be signed in to change notification settings - Fork 118
1.0 Pre-release #336
1.0 Pre-release #336
Conversation
… you want to customize it
Used to customize the type of token we want to generate (ie. confirmation, password reset, etc.)
* Attempt to get token right away. This makes it so that we don’t have to wait for an async response in order to start making authenticated requests. * Also set up localStorage.
- `auth.idField` has been removed. It is now included in all services so we can pull it internally without you needing to specify it. | ||
- `auth.shouldSetupSuccessRoute` has been removed. Success redirect middleware is registered automatically but only triggers if you explicitly set a redirect. [See redirecting]() for more details. | ||
- `auth.shouldSetupFailureRoute` has been removed. Failure redirect middleware is registered automatically but only triggers if you explicitly set a redirect. [See redirecting]() for more details. | ||
- `auth.tokenEndpoint` has been removed. There isn't a token service anymore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a note stating why there isn't a token service anymore. Something like "It has been replaced by custom routes with auth strategies."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing. It sort of is still there though. Currently that's basically what the authentication service is. It generates and removes token.
- `auth.shouldSetupFailureRoute` has been removed. Failure redirect middleware is registered automatically but only triggers if you explicitly set a redirect. [See redirecting]() for more details. | ||
- `auth.tokenEndpoint` has been removed. There isn't a token service anymore. | ||
- `auth.localEndpoint` has been removed. There isn't a local service anymore. It is a passport plugin and has turned into `feathers-authentication-local`. | ||
- `auth.userEndpoint` has been removed. It is now part of `feathers-authentication-local` and is `auth.local.service`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and is
--> as
Tests aren't passing because the plugins and auth are all dependent on each other and aren't published yet. Almost done wrapping up the integration tests and I will publish a pre-release of all of them and then get the client wrapped up. |
Summary
This is a pretty big overhaul and now utilizes passport for the core authentication. This allows us to use any passport strategy from any location: hooks, express middleware, sockets. It also future proofs us so that all we need to do is adapt any other framework or transport to match the expected Passport
request
object.Still to do:
Stretch Goals
These should remove a bunch of the passport boilerplate around setting up middleware routes, looking up the user, verifying password, and populating the user. They should pull from the main app config object. This should make for an easier transition for people as they generally can just be a one liner. Example usage:
Other Information
Related to feathersjs-ecosystem/authentication-client#7