1

我很难弄清楚如何连接到 login.gov。我的应用程序是一个使用 MS .net 5 Blazor Web Assembly 的 Web 应用程序。Microsoft 有一个包来为 Blazor Web Assembly 应用程序实现 OpenId 和 OAthe2。Microsoft.AspNetCore.Components.WebAssembly.Authentication 隐藏了客户端和 IDP 之间的详细通信。我从我的浏览器收到消息:从源“https://localhost:44375”访问“https://idp.int.identitysandbox.gov/openid_connect/authorize/.well-known/openid-configuration”的 XMLHttpRequest ' 已被 CORS 策略阻止:请求的资源上不存在“Access-Control-Allow-Origin”标头。idp.int.identitysandbox.gov/openid_connect/authorize/.well-known/openid-configuration:1 加载资源失败:net::ERR_FAILED。

4

1 回答 1

1

您需要 login.gov 将 https://localhost:44315 URL 配置为允许 CORS 来源。

示例应用程序还在FoxIDs中配置了允许 CORS 来源:

在此处输入图像描述

于 2021-03-24T20:23:10.477 回答