Skip to main content
added 1 character in body
Source Link
Rick Pannekoek
  • 21.4k
  • 1
  • 18
  • 30

Looking at the DXA log file, the problem indeed seems to be in the Context Service: it returned an "invalid_grant" error. In general, CIS microservices do that if thethey are configured for OAuth authentication, but no OAuth bearer token is provided by the client (indeed, a browser will never do that).

The CIL Context Client (used by DXA) should automatically provide an OAuth bearer token if the Discovery Service is configured for OAuth authentication and a Token Service Capability is registered.

If you get this error on the Context Service only, it seems that your CD Environment is configured to not do OAuth, except for the Context Service.

BTW: I noticed in the screenshot that the Context Service Capability is registered with a localhost URL. Note that this means it will only work if the client (Web App) runs on the same host.

Looking at the DXA log file, the problem indeed seems to be in the Context Service: it returned an "invalid_grant" error. In general, CIS microservices do that if the are configured for OAuth authentication, but no OAuth bearer token is provided by the client (indeed, a browser will never do that).

The CIL Context Client (used by DXA) should automatically provide an OAuth bearer token if the Discovery Service is configured for OAuth authentication and a Token Service Capability is registered.

If you get this error on the Context Service only, it seems that your CD Environment is configured to not do OAuth, except for the Context Service.

BTW: I noticed in the screenshot that the Context Service Capability is registered with a localhost URL. Note that this means it will only work if the client (Web App) runs on the same host.

Looking at the DXA log file, the problem indeed seems to be in the Context Service: it returned an "invalid_grant" error. In general, CIS microservices do that if they are configured for OAuth authentication, but no OAuth bearer token is provided by the client (indeed, a browser will never do that).

The CIL Context Client (used by DXA) should automatically provide an OAuth bearer token if the Discovery Service is configured for OAuth authentication and a Token Service Capability is registered.

If you get this error on the Context Service only, it seems that your CD Environment is configured to not do OAuth, except for the Context Service.

BTW: I noticed in the screenshot that the Context Service Capability is registered with a localhost URL. Note that this means it will only work if the client (Web App) runs on the same host.

Source Link
Rick Pannekoek
  • 21.4k
  • 1
  • 18
  • 30

Looking at the DXA log file, the problem indeed seems to be in the Context Service: it returned an "invalid_grant" error. In general, CIS microservices do that if the are configured for OAuth authentication, but no OAuth bearer token is provided by the client (indeed, a browser will never do that).

The CIL Context Client (used by DXA) should automatically provide an OAuth bearer token if the Discovery Service is configured for OAuth authentication and a Token Service Capability is registered.

If you get this error on the Context Service only, it seems that your CD Environment is configured to not do OAuth, except for the Context Service.

BTW: I noticed in the screenshot that the Context Service Capability is registered with a localhost URL. Note that this means it will only work if the client (Web App) runs on the same host.