Custom Auth not storing AUTHORIZATION_TOKEN

Hello,

We have setup a custom auth for all our applications. Here is the setup:

  • We have setup a resource to a GraphQL endpoint
  • We use a form with email + password
  • Once logged in, an AUTHORIZATION_TOKEN is stored in the "magic" variables
  • A "check" query is run using this GraphQL resource, to ensure the user is logged in.
  • If the user is not logged in, the query will fail and a modal is shown to re-authenticate the user.

Some (not all) of our users are unable to use this and are blocked using our Retool apps. The authentication is successful (email + password are correct) but the AUTHORIZATION_TOKEN is not stored/used properly and the check query fails, blocking the user in a loop (modal wil reopen). Sometimes, it works, sometimes it doesn't.

We can guarantee that the problem is not from the email + password, as the user uses those credentials in our own systems and they are correct and work as expected. The problem is highly likely a bug because it works for some users and not for others. In the Resource setup, looking at the defined variables, the variable is set correctly.

We have tried everything:

  • Update the resource
  • Clear cookies
  • Clear local storage
  • Change browser
  • Incognito mode
  • Tried in edit mode
  • Tried in different Retool apps

Can you help solving this issue?

Regards

1 Like

Hi @Arthur_Blanc! Welcome to the community. :slightly_smiling_face:

I notice that there's a license key in our records that is associated with a similar email address - are you on a self-hosted instance when experiencing this issue? If so, it's always useful to get some context about how the instance is deployed.

Additionally, are you able to share screenshots or similar media showing the exact configuration of your custom auth flow? I'll also say that I've seen issues with using a GraphQL endpoint for performing a status check, as it's conventional to return a 200 status code even when throwing exceptions.