Trouble embedding my retool app into an iframe

I am currently loading my retool app in my react app through an iframe like this


After I do this it wants me to login.
However when I login via sign in with gmail it gives me this err from the console: [Service Worker]
 TypeError: Failed to register a ServiceWorker for scope ('')
with script (''): 
A bad HTTP response code (404) was received when fetching the script.

It also gives me this error saying refused to display ‘url’ in a frame because it set ‘X-Frame-Options’ to ‘deny’.

I checked the headers from where this was coming from and it says I have 302 error. I checked the location and request url via my browser and it seemed to work fine, so I am confused on why this error appeared.

I feel like these are the errors that are preventing me from logging in, but I wouldn’t know how to resolve them.

1 Like

Did you solve it? I have the same error.

@rjvarona @Grabriela

The refused to display ‘url’ in a frame because it set ‘X-Frame-Options’ to ‘deny’ error might be tough to overcome here. Google sets the X-Frame-Options to Deny, which doesn’t allow the page to be embedded in a domain outside of their own (see So you’ll likely need to get quite creative in order to make an Google OAuth request from an iFrame.

Our team has this same error - are there any updates on proposed solutions?

Hi @jschwane

As Ben mentioned, this is a bit tricky to workaround. Googles impose a restrictions that does not allow for their domain to be embedded in iframes, which is needed if using Google SSO for authentication to a Retool app. If a user has an active Retool session the embedded app should display as expected, but will require Google SSO authentication outside the iframe. Other options around this limitation of Google SSO would be to establish other forms of authentication like email/password, or for self-hosted instances, SAML.

1 Like