I am trying to migrate to the brand new OIDC flow, switched to the latest v9.2.2 auth-js version and modified the requested parameters, but unfortunately I am stuck with a mysterious error message.
WebAuth instance is initialized with proper domain & clientID as far as i know.
My request is:
webAuth.popup.authorize({
clientID: ,
connection:“google-oauth2”,
device:“webapp”,
nonce:“_x1imhEtnDwZQmz8”, (this is a random string)
redirectUri:“http://localhost:8088/#//”,
responseType:“id_token token”,
scope:“openid offline_access”,
state:“{“page”:“login”}”
});
(I have also tried without “openid” scope, i got the same error.)
@hektor-test Are you using an OIDC conformant client? Which request it triggering the error? Do get an id token and access token from the authentication request? If so, could you decode them in https://jwt.io/ and share the iss values?
Additional info: if I remove the “id_token” from response type, I do get response, but it includes only the access token. Is it possible the acquire an id_token this way?
Can you check your rules (and also try authenticating with all disabled) to see if any of them are the source of the issue?
Can you also try adding the audience with the value https://hektor-test.eu.auth0.com/userinfo in the WebAuth initialization, instead of putting all the attributes in the authorize request? Something like:
After this, I call:
webAuth0.popup,authorize({
connection: “google-oauth2”,
device: “webapp”,
state: “{“page”:“login”}”,
nonce: “ATVJQ0TvNCobCg1k”
});
Unfortunately all this leads to the very same known error message
All I have discovered, that after the initialization, that auth0.WebAuth() adds the token_issuer value to my init object, and its value is always “https://hektor-test.eu.auth0.com”, no matter what :S
Is this a know bug? I don’t know how to retrieve the id_token at the moment.
Note that when only requesting the token but not the id_token, the authentication works…
Hello, I’m not sure if this is still an issue for folks participating in the thread above, but since the question is unresolved, here is the likely reason:
The invalid issuer error is likely being caused by mismatched Auth0 configurations between the static popup callback HTML page and the rest of the Auth0 configurations in the front end and/or API. If changes were made to the configuration that the front end uses and the same changes were not made to the static popup-closing HTML page’s instance of WebAuth, then this error is the result of that mismatch. (It’s tricky to debug because the issuer looks correct in a console error.) If you’re running into this error, i would recommend going through all places in your application stack where you’re defining your Auth0 credentials and ensuring they are ALL consistent. These places might include:
front end app (WebAuth instance using Auth0 domain and client ID)
backend API configuration for verifying secure requests (middleware using Auth0 domain)
popup close static HTML page (WebAuth instance using Auth0 domain and client ID)