How to handle timeout errors with MemberStack DOM package in Laravel login flow?

Hi A J 👋

We have a Laravel application with a login form where we’re using the Memberstack DOM package to authenticate users. The login process itself works successfully.

However, after login, when we fetch the current member’s data, we occasionally encounter a timeout error.
Could you please help us understand what might be causing these intermittent timeouts and how we can properly handle or prevent them?

Comments

1 comment

  • Comment author
    A J

    Hey Muhammad Shahshan,

    If it is intermittent in nature, can you try setting a timeout or slight delay before trying to fetch the current member after the login and see if that helps?

    You can also have a retry functionality as a fallback mechanism such that if the member data was not fetched, after few milliseconds retry to fetch it assuming the data would have been loaded and it just needed slight time to get it after login.

    0

Please sign in to leave a comment.