Skip to content

Commit b407d58

Browse files
committed
Docs: auth module updates
1 parent 8ada9cf commit b407d58

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

docs/auth-plugin.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,18 @@ The Auth module helps setup your app for login / logout. It includes the follow
2020
}
2121
```
2222

23-
### Actions
23+
## Breaking Changes in 2.0
2424

25-
The following actions are included in the `auth` module:
25+
The following breaking changes were made between 1.x and 2.0:
2626

27-
- `authenticate`: use instead of `feathersClient.authenticate()`
28-
- `logout`: use instead of `feathersClient.logout()`
29-
The Vuex auth store may not update if you use the feathers client version.
27+
- The `auth` method is now called `makeAuthPlugin`.
28+
29+
## Setup
30+
31+
See the [Auth Setup](/api-overview.html#auth-plugin) section for an example of how to setup the Auth Plugin.
32+
33+
## Configuration
3034

31-
### Configuration
3235

3336
You can provide a `userService` in the auth plugin's options to automatically populate the user upon successful login.
3437

@@ -41,7 +44,22 @@ const { auth } = feathersVuex(feathersClient, { idField: '_id' })
4144

4245
const store = new Vuex.Store({
4346
plugins: [
44-
auth({ userService: 'users' }) // if your user service endpoint is named 'users'
47+
auth({
48+
userService: 'users', // if your user service endpoint is named 'users'
49+
state: {}, // Custom state
50+
getters: {}, // Custom getters
51+
mutations: {}, // Custom mutations
52+
actions: {} // Custom actions
53+
})
4554
]
4655
})
4756
```
57+
58+
## Actions
59+
60+
The following actions are included in the `auth` module:
61+
62+
- `authenticate`: use instead of `feathersClient.authenticate()`
63+
- `logout`: use instead of `feathersClient.logout()`
64+
65+
> Node: The Vuex auth store may not update if you use the feathers client version of the above methods.

0 commit comments

Comments
 (0)