Skip to content

Commit f11b577

Browse files
Merge pull request #73 from Cl3MM/patch-1
Added auth 'userService' option example in README.md
2 parents 0d34716 + 4df8fa7 commit f11b577

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,20 @@ const feathersClient = feathers()
547547
### Configuration
548548
You can provide a `userService` in the auth plugin's options to automatically populate the user upon successful login.
549549

550+
```js
551+
import Vuex from 'vuex'
552+
import feathersClient from './feathers-client'
553+
import feathersVuex from 'feathers-vuex'
554+
555+
const { auth } = feathersVuex(feathersClient, { idField: '_id' })
556+
557+
const store = new Vuex.Store({
558+
plugins: [
559+
auth({ userService: 'users' }) // if your user service endpoint is named 'users'
560+
]
561+
})
562+
```
563+
550564
## License
551565

552566
Copyright (c) Forever and Ever, or at least the current year.

0 commit comments

Comments
 (0)