The current implementation of useAccessToken allows the user to substitute their Auth header with a refresh token, essentially using it as their access token and bypassing the access tokens' expiration. This means a user can bypass all the security in place for as long as the refresh token lasts.
I recommend you add a check in useAccessToken that it actually is an access token. For example, you can make sure the fingerprint hash does not exist in the decoded token.
The current implementation of useAccessToken allows the user to substitute their Auth header with a refresh token, essentially using it as their access token and bypassing the access tokens' expiration. This means a user can bypass all the security in place for as long as the refresh token lasts.
I recommend you add a check in useAccessToken that it actually is an access token. For example, you can make sure the fingerprint hash does not exist in the decoded token.