Skip to content

QQHandler类中,openId参数值没有正确使用的问题 #185

Open
@andywu188

Description

@andywu188

描述一下BUG

OSharp.Identity.OAuth2.QQ.QQHandler类中,第60行:

`

        string json2 = await userInformationResponse.Content.ReadAsStringAsync();
        JObject payload = JObject.Parse(json2);
        JsonDocument document = JsonDocument.Parse(json2);
        //identity.AddClaim(new Claim(ClaimTypes.NameIdentifier, openId, ClaimValueTypes.String, Options.ClaimsIssuer));

        payload.Add("openid", openId);//注意这里重点

        OAuthCreatingTicketContext context = new OAuthCreatingTicketContext(new ClaimsPrincipal(identity), properties, Context, Scheme, Options, Backchannel, tokens, document.RootElement);

`
以上代码中,payload.Add("openid", openId),之后,没有任何地方有使用payload,应该是有BUG,正确代码应该是向JsonDocument中增加键值对吧

运行环境

  • Version 3.1.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug 🐛有虫,来捉虫

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions