Closed tobyreid closed 2 years ago
@Intevel is this something I can bring your attention to?
This looks clear to me. Good job! 💚
Can confirm this fixes the issue.
Using version: "5.0.0-1643365392.dae6516" with Keycloak
@Intevel
Hi Can we get this merged et released please ?
I am not a maintainer, I am not authorized to merge.
@bmulholland Hi ! Are you a maintainer or do you know someone who's able to merge this and trigger a release to npm ?
He is able to merge this, but he does all this voluntarily. A ping is just annoying
Yep, agreed, thanks @Intevel
On the change itself: it needs a comment explaining why the ordering needs to be as it is. That way we'll know not to accidentally break it in future. Can you please put (an abbreviated version of) the PR description as a comment in the code?
The PR has been updated with the requested comment.
Thanks for the fix, explanation, and for dealing with the annoying linter :)
(Creating this pull request as it appears that it's stalled awaiting a PR into a another fork, rather than the dev branch)
Incorporates both changes from dygeenen and shollingsworth for this PR https://github.com/nuxt-community/auth-module/pull/1417
(thanks both)
This ordering is required, because it is the
access_token
is sent in the Authorization header when making an axios request. If theaccess_token
is expired, we need to refresh that token before continuing.Checking whether the
id_token
has expired doesn't guarantee a successful call to the (a) back end and typically theid_token
has a different (shorter) expiry schedule to theaccess_token
.