Forwarding cookies manually

I've successfully built an app that hits my custom API and sets a session cookie but I'd like a different workflow as I'm embedding my app within a site where the user will already be logged in.

I'd like to pass the cookie to the app via a param and then use it to hit my APi without having to create a username/passwork form - removing the need to log in twice. Is that possible?

In addition, I can't see any documentation anywhere to invalidate the cookie once set. Any tips on how to do that too?

@victoria any chance you could help?

Hey @sionaldson!

I'm not sure that this is possible, the closest I'm finding is to use a Parent Window Query to read a value from an object in the DOM of the site you're embedding Retool in. Could you perhaps store the cookie in the DOM as a success handler on the login request?

There's some cookie forwarding enabled for self-hosted instances but I'm not sure that's applicable here :thinking: