deep-jade
deep-jade4mo ago

Call check when changing resources

When I am inactive for more than 10 minutes and the access token expires and then I click in the menu to move to another resource I get Unauthorized error. How can I trigger check() when changing resources?
2 Replies
kapa.ai
kapa.ai4mo ago
Hi @chachi. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. However, the check method is a crucial part of handling authentication within refine, ensuring that users are authenticated before accessing certain resources. It's used to verify if the user is authenticated and, based on that, allows or denies access to resources. For more detailed information on how to implement or trigger the check method under specific conditions such as changing resources or after inactivity, I recommend consulting the refine documentation directly, especially sections related to the authProvider and its check method. Here are some links that might be helpful: - For understanding how the check method works and its implementation: Auth Provider - check method (https://refine.dev/docs/authentication/auth-provider#check) - For insights on handling authentication state and triggering checks in response to certain events: Usage with Existing Projects - check Method (https://refine.dev/docs/guides-concepts/usage-with-existing-projects#check-method) These sections provide foundational knowledge on handling authentication within refine applications, which could be adapted to your specific use case of triggering the check method when changing resources or after a period of inactivity. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai4mo ago
<@95552725294518272> kapa.ai is still learning and improving, please let us know how it did by reacting below