c# - 使用 Auth0 运行我的 WeGL Unity 游戏的构建时出错
问题描述
我正在尝试将我的统一网络游戏与 auth0 连接起来。我们的想法是在这个游戏上设置一个按钮,将您重定向到 auth0 登录页面。如果登录正确,登录会将您重定向到游戏页面。
问题是,每当我尝试这样做时,它都会引发如下错误:
Uncaught abort(59) at Error
at jsStackTrace (blob:http://localhost/fe45a070-7884-4685-9ce7-c8c6586954fe:8:22295)
at Object.stackTrace (blob:http://localhost/fe45a070-7884-4685-9ce7-c8c6586954fe:8:22466)
at Object.onAbort (http://localhost/Proyecto/Build/UnityLoader.js:4:11047)
at abort (blob:http://localhost/fe45a070-7884-4685-9ce7-c8c6586954fe:8:484763)
at wasm-function[56209]:3
at wasm-function[16669]:46
at wasm-function[46796]:1456
at wasm-function[56098]:16
at Object.dynCall_iii (blob:http://localhost/fe45a070-7884-4685-9ce7-c8c6586954fe:8:459875)
at invoke_iii (blob:http://localhost/fe45a070-7884-4685-9ce7-c8c6586954fe:8:339724)
at wasm-function[46793]:388
at wasm-function[46792]:75
at wasm-function[46790]:99
at wasm-function[46789]:7
at wasm-function[47108]:69
at wasm-function[47107]:7
at wasm-function[18228]:330
at wasm-function[16690]:48
at wasm-function[17191]:1236
at wasm-function[16690]:48
at wasm-function[17240]:1090
at wasm-function[17854]:534
at wasm-function[50883]:330
at wasm-function[17181]:101
at wasm-function[16866]:152
at wasm-function[18035]:71
at wasm-function[18034]:128
at wasm-function[17061]:1169
at wasm-function[16689]:52
at wasm-function[16868]:11
at wasm-function[56136]:22
at Object.dynCall_viiiii (blob:http://localhost/fe45a070-7884-4685-9ce7-c8c6586954fe:8:476660)
at invoke_viiiii (blob:http://localhost/fe45a070-7884-4685-9ce7-c8c6586954fe:8:371147)
at wasm-function[16990]:230
at wasm-function[16988]:97
at wasm-function[16987]:83
at wasm-function[16986]:81
at wasm-function[24829]:513
at wasm-function[24828]:42
at wasm-function[24827]:93
at wasm-function[25055]:77
at wasm-function[55719]:83
at wasm-function[24386]:314
at wasm-function[48387]:21
at wasm-function[48411]:110
at wasm-function[38808]:79
at wasm-function[38809]:14
at wasm-function[17204]:152
at wasm-function[38636]:101
at wasm-function[17316]:153
这是我用来连接 Unity 和 Auth0 的代码:
public void test()
{
var client = new AuthenticationApiClient(new System.Uri("...."));
var authorizationUrl = client.BuildAuthorizationUrl()
.WithResponseType(AuthorizationResponseType.IdToken, AuthorizationResponseType.Token)
.WithClient("...")
.WithConnection("...")
.WithRedirectUrl("....")
.Build();
}
我是 Unity 和 Auth0 的新手。关于可能发生的事情有什么建议吗?
解决方案
虽然我不确定 Unity 方面,但我知道您可以利用通用登录来完成您正在寻找的内容。我建议对您的回调 URL 进行三次检查,以确保在您的应用程序和 Auth0 仪表板中没有故障。
推荐阅读
- python - Groupby 对列求和以获取每个项目的频率
- pandas - 从一个 DataFrame 绘制多条线
- python - 尝试在 python 中使用 (requests.post()) 发布时出现 500 内部服务器错误
- mysql - Mysql IF 语句在嵌套 if 语句上出错
- windows - Powershell + MegaCLI - 使输出更具可读性
- node.js - Nodejs、TypeScript、ts-node-dev 和顶级等待
- reactjs - 类型 'undefined' 不能分配给类型 'number | 大佬
- arrays - 无法使函数读取双数组
- winapi - 对函数的未定义引用,即使它应该是可访问的
- r - 在ggplot中为多个系列条形图有条件地着色条