From bfcf6e2c97009cdae8cac2de83a1d1df88efe5ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro=20Antunes=20Silva?= Date: Thu, 23 Jul 2020 13:43:52 -0300 Subject: [PATCH] docs(api): update doc of the method `setUserToken` --- docs/api/auth.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/api/auth.md b/docs/api/auth.md index 80a7e4b33..3495d7220 100644 --- a/docs/api/auth.md +++ b/docs/api/auth.md @@ -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!')) ```