AuthUser.idToken is stored in browser’s local storage: (appears well-formed, can be validated and parsed)
AuthUser.accessToken is stored in browser’s local storage: (looks malformed to me)
Request to the backend (api/v1/namespaces) is sent with the access token in Authorization header and the ID token in the Authorization-Extras header
Request is rejected by the backend with the message in log “Authorization error”,“error”:“token contains an invalid number of segments”
Apparently the backend also considers the access token malformed.
Could you please advise what we are doing wrong ? Are there any means to further debug the flow ? Is it AD that returns the malformed token or is the token transformed by the UI server in some way ?
It seems my situation is slightly different. It’s not just the signature of the access token that fails to validate. The string sent in the Authorization header does not looks like a JWT token at all:
Authorization: Bearer PAQABAAAAAAD… (rest of the token trimmed by me)
If possible, could you please share your setup ? Are there any notable differences compared to my setup (described above), except for the TEMPORAL_AUTH_SCOPES value ?
Which Web UI version works for you ? I am trying to configure v2.9.0.
Thanks for sharing the configuration. My first issue was that I was missing v2.0 in the AUTH_PROVIDER URL, that’s probably the reason for the malformed token.
The second issue was that my custom scope had to be specified in the AUTH_SCOPES, in addition to the three default ones.
Hi @Extant-1 and @sstro is this still working for you? If so, out of curiosity, how is your app configured in Azure?
I used both of your replies to try to get mine to work, but if I have login.microsoftonline.com I get:
{"message":"Unable to verify ID Token: oidc: id token issued by a different provider, expected \"https://sts.windows.net/tenantid/v2.0\" got \"https://login.microsoftonline.com/tenantid/v2.0\""}
{"message":"Unable to verify ID Token: oidc: id token issued by a different provider, expected \"https://sts.windows.net/redacted/v2.0\" got \"https://sts.windows.net/redacted/\""}