Skip to content

Commit

Permalink
docs(api): update doc of the method setUserToken
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoPedroAS51 committed Jul 23, 2020
1 parent ea6a32e commit bfcf6e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/api/auth.md
Expand Up @@ -73,16 +73,16 @@ Set user data and update `loggedIn` state.
this.$auth.setUser(user)
```

### `setUserToken(token)`
### `setUserToken(token, refreshToken)`

- Returns: `Promise`

Set the auth token and fetch the user using the new token and current strategy.
Set the auth token and optionally the refresh token, then it will fetch the user using the new token and current strategy.

> **TIP:** This function can properly set the user after registration
```js
this.$auth.setUserToken(token)
this.$auth.setUserToken(token, refreshToken)
.then(() => this.$toast.success('User set!'))
```

Expand Down

0 comments on commit bfcf6e2

Please sign in to comment.