@@ -20,15 +20,18 @@ The Auth module helps setup your app for login / logout. It includes the follow
20
20
}
21
21
```
22
22
23
- ### Actions
23
+ ## Breaking Changes in 2.0
24
24
25
- The following actions are included in the ` auth ` module :
25
+ The following breaking changes were made between 1.x and 2.0 :
26
26
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
30
34
31
- ### Configuration
32
35
33
36
You can provide a ` userService ` in the auth plugin's options to automatically populate the user upon successful login.
34
37
@@ -41,7 +44,22 @@ const { auth } = feathersVuex(feathersClient, { idField: '_id' })
41
44
42
45
const store = new Vuex.Store ({
43
46
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
+ })
45
54
]
46
55
})
47
56
```
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