【发布时间】:2019-01-18 21:06:37
【问题描述】:
我正在使用 Swashbuckle 使用 IdentityServer 进行 Swagger 授权。我按照以下步骤操作:https://www.scottbrady91.com/Identity-Server/ASPNET-Core-Swagger-UI-Authorization-using-IdentityServer4。
这是来自 IdentityServer 的日志记录:
2019-01-17 19:17:41.031 +01:00 [ERR] Invalid redirect_uri:
http://localhost:3200/oauth2-redirect.html
{
"ClientId": "demo_api_swagger",
"ClientName": "Swagger UI for API",
"AllowedRedirectUris": [
"http://localhost:5001/oauth2-redirect.html"
],
"SubjectId": "anonymous",
"RequestedScopes": "",
"Raw": {
"response_type": "token",
"client_id": "demo_api_swagger",
"redirect_uri": "http://localhost:3200/oauth2-redirect.html",
"scope": "api_data openid profile",
"state": "VGh1IEph etc.."
}
}
日志记录说:
Invalid redirect_uri: http://localhost:3200/oauth2-redirect.html
但我没有在任何地方设置这个地址,也不知道它来自哪里。如何设置正确的重定向地址?
【问题讨论】:
标签: asp.net-core swagger identityserver4 swagger-ui swashbuckle