W
Wasp2w ago
Kbral

Why that always that i click on screen the 'me' request is being done?

Why that always that i click on screen the 'me' request is being done? Is possible to set a timing to check this?
2 Replies
kapa.ai
kapa.ai2w ago
Hi @Kbral. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the provided knowledge sources, I can offer some insight into why the '/me' request is frequently made in Wasp applications, though the information doesn't fully address your specific question about timing. In Wasp, the '/auth/me' endpoint is used to check if a user is authenticated and to retrieve session information. This is part of Wasp's authentication system. The frequent calls to this endpoint are likely due to the way Wasp handles authentication checks. According to the Github Issue discussion, Wasp uses the '/auth/me' endpoint to determine whether a user has a valid session. The client (browser) makes this request, and if it receives a 200 OK response, it contains the session info. If it receives a 401 Unauthorized response, the client interprets it as the user not having a session. This approach can lead to frequent '/me' requests, especially when navigating between different parts of the application or performing actions that require authentication checks. Regarding setting a timing to check this, the knowledge sources don't provide specific information about configuring the frequency of these checks. However, there is an open issue Revisit auth token clearing behavior on 401 responses that discusses potential improvements to this behavior, which might indirectly affect the frequency of '/me' requests. If you're experiencing performance issues due to frequent '/me' requests, you might want to consider opening an issue on the Wasp GitHub repository to suggest implementing a configurable timing mechanism for these authentication checks. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Kbral, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?

Did you find this page helpful?