I am currently using the free plan of Auth0 and in my React Application and while authenticating users it takes a couple seconds (much too long) after the user logs in for Auth0 to load the user info (like their Auth0 user_id, username, etc…), as well as logging out takes too long.
I’m using the React SPA library for authentication and initialize the Auth0 React Wrapper (same code as here) after a user logs in. But when using the “loading” state it takes forever for my app to stop loading from auth0.
I hope it’s not just my lack of knowledge on making Auth0 efficient in my code so if that’s the case I would love some tutorials on how to make everything go faster too! Also I didn’t know how to tag this post so my apologies if it’s in the wrong category.
TL;DR: Initializing and calling Auth0 API’s in my App takes too long, would buying a paid plan make this faster?
1 Like
Hi TanBeige.
The paid plans have higher limits for the number of requests you can make. While it’s possible that you might get faster speeds, the free tier plans are usually very fast as well (the authentication pipeline is heavily optimized to provide fast responses even under intense workloads).
It might be interesting to find out where exactly the delays are. Have you done any inspection with the browser’s developer tool to check if a particular HTTP request to Auth0 is taking too long?
Do you have rules enabled or a custom DB script? If your rule makes requests to external services, these requests might be adding some time to the overall response time.
Hello,
I do have a couple of rules that call to Hasura’s Postgres database, but they are very short. Would that have the chance of slowing it down by much? I haven’t done much testing either, what would you recommend I use for testing?
Try disabling those and see if that improves the authentication times. Whenever you are reaching out to external services as part of the authentication flow, that’s an increase over the response time that Auth0 doesn’t have any control over.
Another area that’s outside Auth0’s control is the network speed, so if the connection is slow it will definitely impact the user experience.
Sorry for the late response. I tried removing them and it didn’t speed anything up. But I realized that my servers were just slow, after upgrading it made the sign in much faster. Thank you!
1 Like