Replies: 3 comments
-
Hi @BonderTam , thanks for reaching out. If I understand it correctly, you would like to set accessToken lifetime to 60s, and auto-refresh it whenever you're making a new request and the accessToken is expired, am I right? If that's the case then it's automatically handled by the Vue SDK, as long as your refreshToken is still valid. You only need to call Let me know if you have further questions. And you can also join our discord channel for instant release notification and direct dev team support. Thanks, |
Beta Was this translation helpful? Give feedback.
-
yes, call getAccessToken() is only thing that i can do, within vue's setup function. For i am doing now , is setting a setInterval function in an empty vue component, to get 3 accessTokens of different API Resouce. |
Beta Was this translation helpful? Give feedback.
-
Well, as far as I know, we can't provide a function to be called outside of Vue 3's "setup script". I would like to know more details about your "Invalid token" issue. Can you please provide more details on that, maybe the entire error message? Or a minimum reproducible project would be great enough to let me quickly jump into your issues. As for the access token store, yes, we already have built-in support in our JS SDKs, you only need to pass Feel free to ask me if you have any further questions. And since we have also connected on discord, you can ping me directly, too. Thanks, |
Beta Was this translation helpful? Give feedback.
-
I prefer keeping token expiration time in 60s within Logto,
after
const { getAccessToken } = useLogto(); const token = await getAccessToken();
how to auto-refresh token while user keep online.
Beta Was this translation helpful? Give feedback.
All reactions