Open Closed

How to configure the wild card domain in identity sever 4 client cors #2525


User avatar
0
KuldeepRathi created

when we configure the wild card domain in identity server 4 client cors, it gives the error,

Error logs, [07:36:55 DBG] Start token request. [07:36:55 DBG] Start client validation [07:36:55 DBG] Start parsing Basic Authentication secret [07:36:55 DBG] Start parsing for secret in post body [07:36:55 DBG] Parser found secret: PostBodySecretParser [07:36:55 DBG] Secret id found: Civit.Admin [07:36:56 ERR] Invalid client configuration for client Admin: AllowedCorsOrigins contains invalid origin: https://{0}.test.in [07:36:56 INF] {"ClientId": "Admin", "ClientName": "Admin", "Category": "Error", "Name": "Invalid Client Configuration", "EventType": "Error", "Id": 3001, "Message": "AllowedCorsOrigins contains invalid origin: https://{0}.test.in", "ActivityId": "0HMF63R3IBHP2:00000002", "TimeStamp": "2022-02-02T07:36:56.0000000Z", "ProcessId": 1, "LocalIpAddress": "::ffff:172.19.0.2:44374", "RemoteIpAddress": "::ffff:172.19.0.1", "$type": "InvalidClientConfigurationEvent"} [07:36:56 INF] {"ClientId": "Admin", "Category": "Authentication", "Name": "Client Authentication Failure", "EventType": "Failure", "Id": 1011, "Message": "Unknown client", "ActivityId": "0HMF63R3IBHP2:00000002", "TimeStamp": "2022-02-02T07:36:56.0000000Z", "ProcessId": 1, "LocalIpAddress": "::ffff:172.19.0.2:44374", "RemoteIpAddress": "::ffff:172.19.0.1", "$type": "ClientAuthenticationFailureEvent"} [07:36:56 ERR] No client with id 'Admin' found. aborting [07:36:56 INF] Request finished HTTP/1.0 POST https://localhost:44315/connect/token application/x-www-form-urlencoded 150 - 400 - application/json;+charset=UTF-8 4603.2315ms

how to resolve this error, or what is the configuration for the identity server 4 client cors origins for the wild card domain

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

2 Answer(s)
  • User Avatar
    0
    MichelZ created

    I think for CORS you need to use * instead of {0}

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    We have a sample.

    https://github.com/abpframework/abp-samples/tree/master/DomainTenantResolver

    https://github.com/abpframework/abp-samples/blob/master/DomainTenantResolver/MVC-TIERED/src/Acme.BookStore.IdentityServer/BookStoreIdentityServerModule.cs#L55-L61

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.