I am trying to set up OIDC authentication with the oidc-client-js in a React web application and authenticate against Azure B2C.
After completing the sign-in I get this error:
Problem with authentication endpoint: Error: Invalid issuer in token: https://login.microsoftonline.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/v2.0
.
The issuer in the metadata from B2C looks like this:
"issuer": "https://login.microsoftonline.com/{tenantid}/v2.0"
.
The link I'm using to get the metadata is https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration
I looked at the validation code in oidc-client-js and I think they are just doing a string compare between the two values.
Has anyone used oidc-client-js with a B2C IDP?
Is there something I need to configure on the client to make this work?
Is there way to get metadata from B2C that has the tenantid in it?