Redirects not working in chrome.identity

I was working on a chrome app that uses an API chrome.identity.launchWebAuthFlow

to authenticate users to their google account.


  • Clicking the app login button executes this code: chrome.identity.launchWebAuthFlow({'url': <AUTH-URL>, 'interactive': true}, function(redirect_url) { <handle URL here> } });


points to an endpoint on my own server that redirects to<APP-ID>

This thread worked fine until two days ago. Clicking the button will open the chrome identification window, show the google login page, and entering my credentials will trigger a callback function.

It stopped working today. I just see that the message "The page authorization could not be loaded" as soon as I press the login button.

I tried setting a 5 second delay on the server (before redirecting), but the message "Authorizing the page could not be loaded" appears before 5 seconds.

Any ideas what might be going on?


source to share

1 answer

We finally figured it out after 2 days later the login flow was down. The page that was rendered ( <AUTH-URL>

) contained a snippet of Google Tag Manager.

We recently updated this to include MixPanel. This resulted in multiple <script>

attribute elements async

being injected onto the page. Removing Mixpanel from GTM fixed the issue instantly.

I guess removing the tag <script async ...>

did the trick. It wasn't just an OAuth flow - simple links <a>

didn't work either.



All Articles