0

I'm using Google App Script to create a Web Application for a Google Sheet. In order to only allow certain users to access it I use the Google Sign In API to add the button to the application. It needs to allow Google users from two domains and G.A.S doesn't seem to automatically allow detect users unless their signed in under the same domain as the one I used to publish the application.

Initially testing I get uri_mismatch as a JS origin isn't listed in my OAuth client. Usually like " https://n-rataeoifl3gsaxiuusyrb6iqqbdl6lrfttgk27i-0lu-script.googleusercontent.com".

enter image description here

I've had to add at least one of these to the JS authorised origin per site, but one in particular has come back twice over a couple of months with this error after going live but the address comes back the same except for incrementing the -0lu- seciton.

So for that particular application and URL I've had to add: https://n-rataeoifl3gsaxiuusyrb6iqqbdl6lrfttgk27i-0lu-script.googleusercontent.com https://n-rataeoifl3gsaxiuusyrb6iqqbdl6lrfttgk27i-1lu-script.googleusercontent.com https://n-rataeoifl3gsaxiuusyrb6iqqbdl6lrfttgk27i-2lu-script.googleusercontent.com

If anyone has any insight on why this is happening I'd appreciated it thank you.

  • 1
    Possible duplicate of [Different JavaScript origin for the same web app on each computer causes Error: redirect\_uri\_mismatch](https://stackoverflow.com/questions/56862586/different-javascript-origin-for-the-same-web-app-on-each-computer-causes-error) – TheMaster Nov 08 '19 at 09:26
  • @TheMaster I think you're right, not had a chance to test the fix but the problem looks to be the same. Didn't manage to see that one when I was searching, thank you very much. – James Lenthall Nov 08 '19 at 11:00

0 Answers0