Only authenticated users are allowed to see or perform queries.
or
A modal that users are asked to login with their credentials
Only authenticated users are allowed to see or perform queries.
Steps:
We set up a Graphql endpoint under Resources where people can make queries/mutations that have a custom authentication flow.
In the app, I have a button that makes a query to that endpoint. However, it does not prompt users to add their login credentials. We get users not found by clicking that button that makes a query.
Are you able to share any additional information about your custom authentication flow? Did you set it up to use a modal? Does it ultimately return an access token? Any context would be helpful!
Once we can verify that the configuration of that flow looks good, there should be a few different ways to initiate a custom authentication flow, including the "Auth Login" component.
I'm less sure about how to detect whether a user has previously authenticated, though. Retool definitely keeps track of that info but I don't know if it is exposed.
HI @Darren, thank you for your reply. this is currently what I have.
I have a graphQL endpoint that makes a custom auth request to Firebase auth.
Once the user is authenticated, we will send that to our graphQL endpoint with Authorization header to perform the query.
Inside of the app, I have a login button that I was hoping to use like you mentioned but there is no way for me to select what I set up in the custom auth with the graphQL endpoint
I have a button that calls the query I set up but it always returns "unauthorized" without asking the user to login with a form.