vue-auth-plugin icon indicating copy to clipboard operation
vue-auth-plugin copied to clipboard

[FEATURE REQUEST] - Refresh Token

Open go4cas opened this issue 6 years ago • 0 comments
trafficstars

It would be great if one could get a refresh token together with the initial access token in the login response payload - an enhancement to https://github.com/d0whc3r/vue-auth-plugin/pull/80.

Example:

{
  "token": "eyJ************KJU",
  "refreshToken": "ed******************WjT",
  "type": "bearer"
}

The refreshToken is then stored in a separate key in localstorge (or cookie/vuex).

If the refreshData option fires, or with $auth.refresh() method, the API call will then include the refreshToken in the Authorization header or the request body.

Your thoughts?

go4cas avatar Apr 18 '19 04:04 go4cas