nuxt-community / auth-module

Zero-boilerplate authentication support for Nuxt 2
https://auth.nuxtjs.org
MIT License
1.93k stars 924 forks source link

Why don't use RequestController to refresh token? #1799

Open dtes opened 1 year ago

dtes commented 1 year ago

Discussed in https://github.com/nuxt-community/auth-module/discussions/1797

Originally posted by **dtes** November 3, 2022 Hi, I'm just looked at the source code of this project and noticed one moment when need to refresh an expired token you don't use RefreshController. handleRefresh() that helps to avoid refreshing token in parallel, why? The place to use the method RefreshController. handleRefresh(): https://github.com/nuxt-community/auth-module/blob/dfbbb540c5e6c1f0bff0b356c46f50d48ee3f9a5/src/inc/request-handler.ts#L62