关于 Redirect_Uri 的客户端 OpenIdDict 问题
Problem with OpenIdDict on client side regarding the Redirect_Uri
我正在使用 OpenIdDict,但在使用存储在我的数据库中的 redirect_uri 时遇到了问题。我数据库中的 redirect_uri 条目是 signin-oidc 但不知道为什么会出现如下错误。
The request address matched a server endpoint: Authorization.
info: OpenIddict.Server.OpenIddictServerDispatcher[0]
The authorization request was successfully extracted: {
"client_id": "console",
"redirect_uri": "https://localhost:6001/signin-oidc",
"response_type": "code",
"scope": "openid profile",
"code_challenge": "Nr0Jgf4cY3jUtC_1w3GwZ2ryR5FeYoSWrYpu7VF2nxQ",
"code_challenge_method": "S256",
"response_mode": "form_post",
"nonce": "637773059511435225.Y2ZkMDY4MzctYjczNi00MmFlLWFiNjEtMmJlOWI1NDllMzNjOTYxY2Q1MmQtNDcyOS00N2RmLTgyZTQtZDg4Yjc0ZDk5ODk4",
"state": "CfDJ8NYwebNNwH9FkusxDMvbzdrGCOwob0ZBYnanAjf_cGnDjOjF-VnCxbzK8hxyodvDee-v7Sh2Ny4zKhbjOZZZEzSKi-ebQCROJYha2GUiUxbDpvX34Drs-ehjMozt68GkY2ETu_GIf-vRr7Ij4KXaSeUeq5bZioLyJI97kf79txzv700HeEQxxK_unsvj8n8s4fOELMx9dRydCBV0Yw26jROlb-_qjhP9cL1pALEoZ2xeotAl8LY9FZjUDuOuHZSknK-GGFUIhT34-rJ_Wg71MncO-Mat__6m_ISNkr7BIti6qf9qPnLcrTeW-eg6Y_9IK8W_G59ChO1-wwD5Q1A68F086xzGVEvkPLeH1HCGFi0BceBRjRI_Efer9yWJn3pzow",
"x-client-SKU": "ID_NETSTANDARD2_0",
"x-client-ver": "6.11.1.0"
}.
fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
An unhandled exception has occurred while executing the request.
System.Text.Json.JsonReaderException: 'h' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker)
at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first)
at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
at System.Text.Json.Utf8JsonReader.Read()
我意识到 redirect_urls 是一个存储在数据库中的数组,而不是单个重定向 url。
我正在使用 OpenIdDict,但在使用存储在我的数据库中的 redirect_uri 时遇到了问题。我数据库中的 redirect_uri 条目是 signin-oidc 但不知道为什么会出现如下错误。
The request address matched a server endpoint: Authorization.
info: OpenIddict.Server.OpenIddictServerDispatcher[0]
The authorization request was successfully extracted: {
"client_id": "console",
"redirect_uri": "https://localhost:6001/signin-oidc",
"response_type": "code",
"scope": "openid profile",
"code_challenge": "Nr0Jgf4cY3jUtC_1w3GwZ2ryR5FeYoSWrYpu7VF2nxQ",
"code_challenge_method": "S256",
"response_mode": "form_post",
"nonce": "637773059511435225.Y2ZkMDY4MzctYjczNi00MmFlLWFiNjEtMmJlOWI1NDllMzNjOTYxY2Q1MmQtNDcyOS00N2RmLTgyZTQtZDg4Yjc0ZDk5ODk4",
"state": "CfDJ8NYwebNNwH9FkusxDMvbzdrGCOwob0ZBYnanAjf_cGnDjOjF-VnCxbzK8hxyodvDee-v7Sh2Ny4zKhbjOZZZEzSKi-ebQCROJYha2GUiUxbDpvX34Drs-ehjMozt68GkY2ETu_GIf-vRr7Ij4KXaSeUeq5bZioLyJI97kf79txzv700HeEQxxK_unsvj8n8s4fOELMx9dRydCBV0Yw26jROlb-_qjhP9cL1pALEoZ2xeotAl8LY9FZjUDuOuHZSknK-GGFUIhT34-rJ_Wg71MncO-Mat__6m_ISNkr7BIti6qf9qPnLcrTeW-eg6Y_9IK8W_G59ChO1-wwD5Q1A68F086xzGVEvkPLeH1HCGFi0BceBRjRI_Efer9yWJn3pzow",
"x-client-SKU": "ID_NETSTANDARD2_0",
"x-client-ver": "6.11.1.0"
}.
fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
An unhandled exception has occurred while executing the request.
System.Text.Json.JsonReaderException: 'h' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker)
at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first)
at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
at System.Text.Json.Utf8JsonReader.Read()
我意识到 redirect_urls 是一个存储在数据库中的数组,而不是单个重定向 url。