Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RefreshHandler failing to find refreshToken value #842

Open
AidosMarcos opened this issue Aug 2, 2024 · 0 comments
Open

RefreshHandler failing to find refreshToken value #842

AidosMarcos opened this issue Aug 2, 2024 · 0 comments
Assignees
Labels
bug A bug that needs to be resolved provider-refresh An issue with the refresh provider

Comments

@AidosMarcos
Copy link

Environment

  • Operating System: Windows_NT
  • Node Version: v18.13.0
  • Nuxt Version: 3.11.2
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.6
  • Package Manager: npm@9.6.5
  • Builder: -
  • User Config: ssr, typescript, vite, modules, auth, app, nitro, sourcemap, devServerHandlers
  • Runtime Modules: @sidebase/nuxt-auth@0.8.1, @pinia/nuxt@0.5.1
  • Build Modules: -

Reproduction

My configs

auth: { baseURL: 'https://xxx.xxx.xxx.xxx:xxxx/api/user/', globalAppMiddleware: true, sessionRefresh: { enablePeriodically: 1200000, enableOnWindowFocus: true, }, provider: { type: 'refresh', token: { signInResponseTokenPointer: '/tokens/token', type: 'Bearer', headerName: 'Authorization', maxAgeInSeconds: 300, }, refreshToken: { signInResponseRefreshTokenPointer: '/tokens/refreshToken', refreshRequestTokenPointer: 'Bearer', maxAgeInSeconds: 28800, }, pages: { login: '/login' }, endpoints: { signIn: { path: 'login', method: 'post' }, signOut: { path: 'logout', method: 'post' }, signUp: undefined, getSession: undefined, refresh: { path: 'refresh', method: 'post' } } } }

I have my external API handling requests, login works and i correctly save the values of Token and RefreshToken

Describe the bug

When refresh automaticly sets off refreshHandle fails to find refreshToken value and stops the process.

Confirmed i have the token cookies with correct values, and all pointers are correct.
image

Additional context

I was able to verify that the refreshToken is correctly saved

const { status, token, refreshToken } = useAuth(); console.log(refreshToken.value);

And the token was correct

Logs

No response

@AidosMarcos AidosMarcos added bug A bug that needs to be resolved pending An issue waiting for triage labels Aug 2, 2024
@zoey-kaiser zoey-kaiser added provider-refresh An issue with the refresh provider and removed pending An issue waiting for triage labels Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug that needs to be resolved provider-refresh An issue with the refresh provider
Projects
None yet
Development

No branches or pull requests

3 participants