Skip to content

bug: LoadUserInfo with Resource is not handled by Blorc.OpenIdConnect #27

Open
@kjbtech

Description

@kjbtech

Describe the bug

When using the wasm sample, if I want to use the token in a protected resource (aka a web API),
I'm not redirected fully on my page after validated via LogTo login page.

For example, when I define:

  "IdentityServer": {
    "Authority": xx",
    "ClientId": "xx",
    "RedirectUri": "xx", // Remember to configure this in Logto
    "PostLogoutRedirectUri": "xx", // Remember to configure this in Logto
    "ResponseType": "code",
    "Scope": "openid profile",
    "LoadUserInfo": true,
    "Resource": "yy",
    "ExtraTokenParams": {
      "resource": "yy" // Ensure the key is lowercase
    }
  }

I get when I'm redirected to my website from LogTo:
Capture d'écran 2024-04-26 164906

If I remove the JSON node "ExtraTokenParams", no trouble!

Expected behavior

I'm redirecting to the LogTo login page.

How to reproduce?

Use the wasm sample provided in this repo and add:

    "Resource": "yy",
    "ExtraTokenParams": {
      "resource": "yy" // Ensure the key is lowercase
    }

Context

  • Logto Cloud
  • Self-hosted, Logto version =
    • Container (Docker image)
    • Raw Node.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions