trandaison / nuxt-3-auth

A simple authentication module for Nuxt 3
https://nuxt-3-auth.github.io
56 stars 5 forks source link

Invalid token #16

Closed paulvonber closed 3 months ago

paulvonber commented 3 months ago

Any suggestion what could cause of getting this error message? It seems it's related to refresh token, but I'm not getting why jwtDecode is trying to decode refresh_token.

Invalid token specified: missing part #2

image
trandaison commented 3 months ago

Hi @paulvonber There is a limitation so far, it requires to use jwt tokens (also mentioned on the docs). If your token is not a jwt one will cause this error. In fact, I am planning to support any type of token soon. Can you switch to JWT tokens until then if possible? Or any PR are welcome.

paulvonber commented 3 months ago

Hi @paulvonber

There is a limitation so far, it requires to use jwt tokens (also mentioned on the docs). If your token is not a jwt one will cause this error.

In fact, I am planning to support any type of token soon. Can you switch to JWT tokens until then if possible? Or any PR are welcome.

Thanks, yeah I've realised that you need jwt in order to get expiry date of the refresh token, would be quite nice to have manually added maxAge in config 😌

trandaison commented 3 months ago

@paulvonber non-jwt tokens are now supported from v0.1.1, give it a try and let me know if you have any problem.