Search code examples
c#abp-frameworkopeniddict

How could I set multi redirect_uri for the same client_id in abp frameworks 7.x


Can I set multi redirect_uri for the same client_id like other oauth serber ? for example, keycloack and google can set multi valid redirect URIs in one client_id.

I have no ideal how to do it. I try set data to database table OpenIddictApplications, but it no work.


Solution

  • Yes. At least when using the EFCore storage, OpenIddictApplications.RedirectUris (and PostLogoutRedirectUris) contains a JSON string array, so you can allow multiple redirect_uris for the same client_id by setting the value in the database to an array with multiple values. For example:

    ["https://instance1.example.org/oidc-login", "https://instance2.example.com/login/oidc/callback"]