Open Closed

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

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} [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}", "ActivityId": "0HMF63R3IBHP2:00000002", "TimeStamp": "2022-02-02T07:36:56.0000000Z", "ProcessId": 1, "LocalIpAddress": "::ffff:", "RemoteIpAddress": "::ffff:", "$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:", "RemoteIpAddress": "::ffff:", "$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

1 Answer(s)
  • 0
    MichelZ created

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