The only difference is that I will not have a login form but a token in the url.
With this token I will call a and API that wil return an OK and a JWT token.
I need to run this query on page load; but also need co catch the ok message, store data using appsmith.store.
I know it’s possible to run an Query on page load but how can I catch the error or success msg and do further things with it.
I tried using a Container. Visible property but that does not allow access query.run()
It works fine witha Button.onClick event but I want the redirect to be automatic, without a click.
You may simulate this by having a small, discrete, iframe, that loads a transparent html from your server that has a small js snipet to call parent.postMessage().
You then configure the iframe onMessageReceived property to run a JS function, that starts your app logic.
There are other difficulties like errors on objects whose data binding is not initialized, but for now it seems to work just the same.
An example of a small html file you can use: