0

I have published a Google Apps Script as a web app. Because the URL is not so nice, I have included the script in an iframe on a site with a nicer URL. I have included the corresponding option so that it works at all. Now this web app should only be accessible within the Google Workspace (formerly known as GSuite) I am working in. This setting can be done when publishing the Web App. The problem is, however, that some users (by far not all users!) in our Google Workspace cannot access the Google Apps Script that way. There is a error message saying that Google prohibits the connection.

enter image description here

It seems like the authenticiation does not work "through the iframe". Interestingly, the problem only arises when

  • the script is embedded in an iframe (the direct script URL by Google works for the users)
  • the script is restricted to the Google workspace.
  • Chrome is used (the issue does not happen with Firefox)

It is remarkable that for most users in our Google Workspace the issue does not appear. We had similar problems when including the script on a Google site (which, in the end, is also just an iframe), but with less users experiencing the issue. I have already made sure that the users are only logged in with their Google Workspace account (no other account which has no permission). In Inkognito mode the same happens.

Can someone explain this behaviour? And how to fix that (without changing the framework)?

  • Hi there @MartinBrandenburg ! To prevent x-frame issues, please make sure that your [XFrameOptionsMode](https://developers.google.com/apps-script/reference/html/x-frame-options-mode) is set to `ALLOWALL`. If that didn't help, could you please share the minimal Apps Script project that replicates this behaviour? – Jacques-Guzel Heron Dec 14 '20 at 09:49
  • I have mentioned in the 3rd sentence (with a link) that I included that option. The behaviour cannot be replicated in a reliable way, since a) it only happens for some users, b) it works perfectly for other projects. But I will see if I can build something ... –  Dec 14 '20 at 21:12
  • 1
    Since this behaviour can't be replicated and it only affects specific users, this may be an issue related to the project itself. In that case I recommend you to write to [Workspace Support](https://support.google.com/a/answer/1047213) to receive customized help. – Jacques-Guzel Heron Dec 17 '20 at 14:58

1 Answers1

0

I have been in contact with the Google support. If I remember correctly, this kind of authentication will be deprecated and should now be done with other tools, for example Google's Firebase Auth.