Google 应用程序脚本对话框中显示的 Dropbox OAuth2 登录页面损坏

Dropbox OAuth2 login page broken when shown in Google App Script Dialog Box

我正在尝试从 Google 电子表格脚本执行 OAuth2 登录。 我正在向 https://www.dropbox.com/1/oauth2/authorize 发送请求,获得有效响应并使用

显示 Dropbox 登录页面
var response = UrlFetchApp.fetch(url, opts).getContentText();
HtmlService.createHtmlOutput(response).setSandboxMode(HtmlService.SandboxMode.NATIVE);
SpreadsheetApp.getUi().showModalDialog(html, 'Dropbox Login');

问题是在我输入用户名和密码后,登录按钮仍然处于禁用状态。我尝试了所有三种可能的沙盒模式。

您是否尝试查看 google 应用脚本状态令牌生成器?它旨在用于 OAuth2。

https://developers.google.com/apps-script/reference/script/state-token-builder

另请参阅此 github 示例: https://github.com/googlesamples/apps-script-oauth2