You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 22, 2022. It is now read-only.
`feathers-authentication` adds shared [PassportJS](http://passportjs.org/) authentication for Feathers HTTP REST and WebSocket transports using [JSON Web Tokens](http://jwt.io/).
12
+
`@feathersjs/authentication` adds shared [PassportJS](http://passportjs.org/) authentication for Feathers HTTP REST and WebSocket transports using [JSON Web Tokens](http://jwt.io/).
15
13
16
14
17
15
## Installation
@@ -37,7 +35,7 @@ This module contains:
37
35
38
36
### Hooks
39
37
40
-
`feathers-authentication` only includes a single hook. This bundled `authenticate` hook is used to register an array of one or more authentication strategies on a service method.
38
+
`@feathersjs/authentication` only includes a single hook. This bundled `authenticate` hook is used to register an array of one or more authentication strategies on a service method.
41
39
42
40
> **Note:** Most of the time you should be registering this on your `/authentication` service. Without it you can hit the `authentication` service and generate a JWT `accessToken` without authentication (ie. anonymous authentication).
43
41
@@ -108,19 +106,19 @@ The following default options will be mixed in with your global `auth` object fr
108
106
109
107
The following plugins are complementary but entirely optional:
Refer to [the migration guide](./docs/migrating.md).
121
119
122
120
## Complete Example
123
-
Here's an example of a Feathers server that uses `feathers-authentication` for local auth. You can try it out on your own machine by running the [example](./example/).
121
+
Here's an example of a Feathers server that uses `@feathersjs/authentication` for local auth. You can try it out on your own machine by running the [example](./example/).
124
122
125
123
**Note:** This does NOT implement any authorization. Use [feathers-permissions](https://github.com/feathersjs/feathers-permissions) for that.
@@ -155,15 +155,15 @@ Authenticating through the Feathers client is almost exactly the same with just
155
155
156
156
-`type` is now `strategy` when calling `authenticate()` and must be an exact name match of one of your strategies registered server side.
157
157
- You must fetch your user explicitly (typically after authentication succeeds)
158
-
- You require `feathers-authentication-client` instead of `feathers-authentication/client`
158
+
- You require `feathers-authentication-client` instead of `@feathersjs/authentication/client`
159
159
160
160
You can use `feathers-authentication-compatibility` on the server to keep the old client functional, this helps to migrate large scale deployments where you can not update all clients/api consumers before migrating to `>=1.0.0` Check https://www.npmjs.com/package/feathers-authentication-compatibility for more information.
If you want to customize things further you can refer to the [`feathers-authentication-jwt`](https://github.com/feathersjs/feathers-authentication-jwt) module or implement your own custom passport JWT strategy.
269
+
If you want to customize things further you can refer to the [`feathers-authentication-jwt`](https://github.com/feathersjs/authentication-jwt) module or implement your own custom passport JWT strategy.
270
270
271
271
## Hook Changes
272
272
@@ -282,7 +282,7 @@ For the JWT strategy, this hook has different behavior from the old hooks: it wi
282
282
283
283
### Removed Hooks
284
284
285
-
We have removed all of the old authentication hooks. If you still need these they have been moved to the [feathers-authentication-hooks](https://github.com/feathersjs/feathers-authentication-hooks) repo and some of them have been deprecated.
285
+
We have removed all of the old authentication hooks. If you still need these they have been moved to the [feathers-authentication-hooks](https://github.com/feathersjs/authentication-hooks) repo and some of them have been deprecated.
286
286
287
287
The following hooks have been removed:
288
288
@@ -298,9 +298,9 @@ The following hooks have been removed:
298
298
Typically you saw a lot of this in your hook definitions for a service:
We've added more helpful warning messages and added debug logs for every hook, service, and middleware. We use the [debug]() module so usage is the same.
26
26
27
27
#### Turning on all auth logs
28
-
You can turn on all auth debug logs by running your app with `DEBUG=feathers-authentication* npm start`.
28
+
You can turn on all auth debug logs by running your app with `DEBUG=@feathersjs/authentication* npm start`.
29
29
30
30
#### Turning on logs for a specific type
31
-
If you want to only turn on logs for a `hooks`, `express`, `passport` or `service` you can do `DEBUG=feathers-authentication:<type>* npm start`. For example,
31
+
If you want to only turn on logs for a `hooks`, `express`, `passport` or `service` you can do `DEBUG=@feathersjs/authentication:<type>* npm start`. For example,
If you want to only turn on logs for a specific hook, middleware or service you can do `DEBUG=feathers-authentication:<type>:<entity> npm start`. For example,
38
+
If you want to only turn on logs for a specific hook, middleware or service you can do `DEBUG=@feathersjs/authentication:<type>:<entity> npm start`. For example,
This provides a complete working example of some of the basic usage of `feathers-authentication`.
3
+
This provides a complete working example of some of the basic usage of `@feathersjs/authentication`.
4
4
5
5
1. Start the app by running `npm start`
6
6
2. Make a request using the authenticated user.
@@ -9,4 +9,4 @@ This provides a complete working example of some of the basic usage of `feathers
9
9
curl -H "Content-Type: application/json" -X POST -d '{"email":"admin@feathersjs.com","password":"admin"}' http://localhost:3030/authentication
10
10
```
11
11
12
-
For more details refer to the [`test/integration`](../test/integration) folder to see how you can authenticate with the server or refer to the [feathers-authentication-client](https://github.com/feathersjs/feathers-authentication-client).
12
+
For more details refer to the [`test/integration`](../test/integration) folder to see how you can authenticate with the server or refer to the [feathers-authentication-client](https://github.com/feathersjs/authentication-client).
0 commit comments