Using URL parameters in custom API auth resource

Hello everyone,

I'm trying to integrate with custom API auth in our retool app.
I've followed this guide: Custom API authentication , but instead of having a modal window where the user inserts the auth details, we would need to read the value directly from the URL parameters.
I can see one can associate a URL parameter to a component on a page or to a temporary state, is it possible to associate it to a value that can be read by custom API auth?

Thanks a lot!

I tried saving the value of the URL parameter in localStorage on page load and retrieving it in the custom auth resource, none of the retool recommended way or vanilla JS way worked:
{{ localStorage.values.code }}
{{ JSON.parse(localStorage.getItem('customAppData')).code }}

Is there a way to retrieve data from local storage in resources? Or pass down the URL parameter value to resource in any other way?

Hey @oktawia.kata! This is a great question. I don't believe resources can access localStorage values or really any app-level JS, unfortunately. For context, why would you like to access the url params in your custom auth flow? :slight_smile: