1) My goal: I'm building a dashboard that requires user authentication. I've created an auth resource and connected it to an auth login component. According to forum posts, Retool doesn't have a native way to trigger a query after a successful (or unsuccessful) login attempt. To work around this, I created a separate query that attempts to retrieve information from our API - if the login was successful, this query succeeds; if not, it returns an error. I'm using this approach to determine what happens next in the system.
2) Issue: I've tried everything but I cannot figure out how to pass the OAUTH2_TOKEN to my query, so it always fails, and the user can never access the dashboart. I need help understanding how to properly pass the authentication token from the login component to my subsequent API query.
3) Steps I've taken to troubleshoot: Did 2 auth resourses with 2 different querys
4) Additional info:
First approach:
Auth resourse
Query to manage workarround (and its error)
Second approach:
same but with custom auth and custom variables
The query requires authorization since it's triggered after login. I've verified that the token is generated correctly in the backend. However, I believe the issue is that the token isn't being properly passed to the query, causing it to fail despite successful authentication.
Any help with this issue would be tremendously appreciated. Thank you in advance!