即使用户已经将其部署为供“任何人,甚至匿名"使用,Web应用仍要求用户登录. [英] Web app asking user to login, even though its been deployed to be used by "Anyone, even anonymous"

查看:37
本文介绍了即使用户已经将其部署为供“任何人,甚至匿名"使用,Web应用仍要求用户登录.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经部署了一个脚本作为Web应用程序,可以由任何人,甚至是匿名用户"访问,但是,如果用户尚未在特定浏览器上登录gmail帐户,它会要求他们登录

I've deployed a script to be used as a web app that can be accessed by "Anyone, even anonymous" and yet, if a user has not logged into a gmail account on a particular browser, its asking them to login.

这是我的清单文件-

{
  "timeZone": "Asia/Kolkata",
  "dependencies": {
  },
  "webapp": {
    "access": "ANYONE_ANONYMOUS",
    "executeAs": "USER_DEPLOYING"
  },
  "exceptionLogging": "STACKDRIVER"
}

要重现此问题,您可以通过注销gmail帐户(或在未登录gmail的浏览器中)访问以下链接-

To replicate the problem, you can visit the following link by logging out of your gmail accounts (or in a browser that does not have your gmail sign in) -

https://script.google.com/macros/s/AKfycbyayXeY_LGm7sy-J1VGvg7wfqOZYonZmKphS0F4Qz4jLZ336qsR/exec/test *

**要求您不要更改URL的pathInfo

当前行为-

  1. 登录后:您将被重定向到 https://www.google.com/
  2. 退出后:将要求您登录到Google帐户.

我正在构建(或更确切地说,尽管我已经构建了)使用Apps的 URL缩短程序服务脚本,奇怪的是,它不是要求用户从自定义域访问时登录(嵌入在 https://tmt中的iframe).pw ),但要求他们在缩短网址后尝试登录,并尝试访问缩短的网址.

I'm building (or rather, though I already had built) a URL shortener service using Apps Script and oddly, it is not asking users to login when accessed from a custom domain (an iframe embedded in https://tmt.pw) but it is asking them to login once they shorten the URL and try visiting the shortened URL.

所有原始资源都在这里-

The original resources are all available here -

我已经在Chrome,Safari和Firefox(都在Mac上)上进行了测试,它们都表现出相同的行为.

I've tested this on Chrome, Safari and Firefox (all on a Mac) and they all exhibit the same behavior.

我猜这是一个非常基本的东西,我只想让Web应用程序不要求用户登录,因为已经指示它即使对于匿名用户也要执行.

I'm guessing this is something very fundamental and all I want is the web app to not ask users to login, given that it has been instructed to execute even for an anonymous user.

该脚本还可以处理电子表格,因此我尝试使该表可以由所有人(Internet上的任何人)公开编辑,但仍然无法正常工作.

The script has some business with a Spreadsheet as well and so I tried making the sheet publicly editable by everyone (anyone on the internet) and it still didn't work.

使用1个私有函数(函数名末尾带有 _ )&已经停止在我的脚本中执行此操作-仍然没有任何更改;问题仍然存在.

Was using 1 private function (with an _ at the end of the function name) & have stopped doing that in my script - still no change; problem persists.

推荐答案

在/exec重定向后触发登录后,在路径中添加参数.使用 queryString 可能会起作用.

Adding the parameter in the path after the /exec triggers the login after the redirect. Using the queryString will probably work.

这篇关于即使用户已经将其部署为供“任何人,甚至匿名"使用,Web应用仍要求用户登录.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆