panva / openid-client

OAuth 2 / OpenID Connect Client API for JavaScript Runtimes
MIT License
1.83k stars 392 forks source link

Modify the issuer URL after discover #269

Closed Lakshman1996 closed 4 years ago

Lakshman1996 commented 4 years ago

Hi

I am discovering the issuer using Microsoft common URL to perform multi tenant auth. i tried modifying the issuer URL in metadata as mentioned in this issue The value in the metadata object remains same even after assigning a new value. Is there anything that i am missing?

Thanks

panva commented 4 years ago

Why are you trying to do that? Ever since 2.5.0 that shouldn't be needed anymore.

Lakshman1996 commented 4 years ago

I get this error unexpected iss value, expected https://sts.windows.net/{tenantid}/, got: https://sts.windows.net/8d88c9c2-2058-486d-9cd4-2fc9010326bc/ when is use https://login.microsoftonline.com/common for discover.

I have to use common endpoint for Multi tenant auth to work in AAD

panva commented 4 years ago

Can't you use https://login.microsoftonline.com/common/v2.0 instead? That one (v2.0) is handled and is known to be at a better level when it comes to OIDC conformance.

panva commented 4 years ago

v3.15.3 released that handles v1 common the same as v2 common.

Please consider supporting the library if it provides value to you or your company and this and the previous support was of help to you. Supporting the library means, amongst other things, that such support will be available in the future.

Lakshman1996 commented 4 years ago

Thanks for the quick reply. Using v2.0 worked.