-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClientAuthError: Error: could not resolve endpoints. Please check network and try again when not supplying authenticationParameters #691
Comments
@Tovli Thanks for raising this. loginPopup() should have been working without any request. Will reach out once I debug this. |
@Tovli I just tested this and it works as expected. loginPopup() works without a parameter. From the error you posted I do see that this error could be thrown if the endPoint verification is failing. Can you please send us the authority that you are using to make this call? We make a call to the end point before sending a real request to the service to ensure that it is a reachable and valid. A call is made to Open-Id well known configuration and any failure in this path causes the above error: "Error: could not resolve endpoints." |
Hi man,
you are right, I forgot to add my config.
I'm sending authority : https://login.microsoftonline.com/tfp/<tenant_name>.
onmicrosoft.com/<SignInSignUp_User_Flow_Name>
And the ClientId of course.
Sorry for the disinformation
Thanks for checking this
Now I send the same authority in the loginRequest as well and it works as
expected (Would change that later on of course :) )
…On Sun, May 5, 2019, 23:21 Sameera Gajjarapu ***@***.***> wrote:
@Tovli <https://github.com/Tovli> I just tested this and it works as
expected. loginPopup() works without a parameter. From the error you posted
I do see that this could be probably the endPoint Verification that is
failing. Can you please send us the authority that you are using to make
this call?
"Error: could not resolve endpoints." is seen only when we make a call to
the end point before sending a real request to the service to ensure that
it is a reachable and valid. A call is made to Open-Id well known
configuration
<https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-protocols-oidc#fetch-the-openid-connect-metadata-document>
and any failure in this path causes the above error.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#691 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADM67RAPPCLJZTJEOPVLRR3PT46ULANCNFSM4HK37EXA>
.
|
so this is the expected behavior?
…On Sun, May 5, 2019, 23:38 Sameera Gajjarapu ***@***.***> wrote:
Closed #691
<#691>
.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#691 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADM67RFPSWIUAHHNGDORFFLPT5ASRANCNFSM4HK37EXA>
.
|
Yes. loginPopup() and logonRedirect() work without any inputs, they give you an idToken with scopes as "clientId". acquireToken() calls need 'scopes' as parameters. Any failure in the i/p parameters in config(if authority is set there - or during app registration) is thrown to the user before we proceed with the authentication. |
Wonder why you've decide to introduce this in 1.0.0
The only thing I do now is sending the authority to the loginPopup as well
as to the constructor.
previously (0.2.4) just the constructor was enough...
The error text is still an enigma to me as the url stays the same.
I must be missing something in the desired flow
…On Mon, May 6, 2019, 00:01 Sameera Gajjarapu ***@***.***> wrote:
Yes. loginPopup() and logonRedirect() work without any inputs, they give
you an idToken with scopes as "clientId". acquireToken() calls need
'scopes' as parameters.
Any failure in the i/p parameters in config(if authority is set there - or
during app registration) is thrown to the user before we proceed with the
authentication.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#691 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADM67RG3Q6VUNE4IV6SBDPLPT5DK3ANCNFSM4HK37EXA>
.
|
oh! Sorry I misunderstood you too. I thought passing the right authority in 'configuration' solved your issue. Are you saying if the authority in configuration is correct and you are making a loginPopup() request without any parameters, are you still failing? |
yes.
I will try to put a better code sample for this issue tomorrow.
it's midnight here already :-)
Thanks for helping.
…On Mon, May 6, 2019, 00:08 Sameera Gajjarapu ***@***.***> wrote:
oh! Sorry I misunderstood you too. I thought passing the right authority
in 'configuration' solved your issue. Are you saying if the authority in
configuration is correct and you are making a loginPopup() request without
any parameters, are you still failing?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#691 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADM67RF5GL56AZVYYEPXRMLPT5ED7ANCNFSM4HK37EXA>
.
|
Hi My workaround was to create a login request with authority and pass it to the login popup:
Hope that clarify the issue |
@Tovli I ack your response. I will try to reach out this/next week on this once I check with the B2C service team. I have tested with MSA and it works without 'authority' and hence I suspect the B2C flow issue in this case. |
Thanks. Maybe I'm misusing the authority parameter... |
Hi, I'm getting the same error as @Tovli. I updated my code from preview.4 to the 1.0 release, then the error occurred. Solved it by doing the change below. Not sure why i need to add authority again after adding it in the constructor of UserAgentApplication. this.msalAgent = new UserAgentApplication({
auth: {
clientId, // My client id
authority // My Auth
},
...
})
...
// Worked in 1.0.0-preview.4, but not 1.0.0
this.msalAgent.loginPopup().then(...)
// Works in 1.0.0
this.msalAgent.loginPopup({
authority // My auth
}).then(...) |
Hi @Tovli and @runeabrahams1 thanks for your feedback. Can you post the full stack trace of the error you are receiving? We can help better debug these issues that way. Thanks. |
@Tovli and @runeabrahams1 I found one issue which will be a PR soon, in addition to this as @pkanher617 mentioned stack trace would help us get a test branch sooner to ensure we are fixing the same bug. |
Can you guys please try #698 and let me know? The PR still needs Unit tests added, but I suspect this will fix your issue. |
@sameerag thanks, I will test it later. In the meantime, here is my stackTrace:
|
@sameerag - As I am using npm to install msal in my app (vue spa). I cannot test this using the same way I would install the npm package you eventually publish (no name attribute in the package.json) |
Experiencing this issue as well, but only in Edge. In Chrome works as expected.
Configuration:
We've tried with and without authority, but still get the same error on Edge. Chrome works in either case. Tried using msal version 1.0.0 and 1.0.0-preview.5, same result. |
FWIW I believe I just ran into this issue the first time I tried to use the msal library. The symptoms+fix+error message seem to be the same. I debugging the issue and it does indeed seem to be fixed with #698 . Note that it affects both loginPopup and loginRedirect and #698 appears to fix both cases. |
Great! Thanks, @AE-MS. I will optimize all our parameter checks tonight and finalize this PR. We want this included in the patch release we are planning next week. |
#698 is now merged with dev. |
Closing this as the PR #698 got merged into dev now. |
Thanks.
I need to understand how I can test code that is on PR and not through npm
in vue so I can be of a better help
…On Fri, May 24, 2019, 22:28 Sameera Gajjarapu ***@***.***> wrote:
Closing this as the PR #698
<#698>
got merged into dev now.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#691?email_source=notifications&email_token=ADM67REDRWPWXBGD55ML4WTPXA6WBA5CNFSM4HK37EXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWGL57A#issuecomment-495763196>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADM67RFXLKCUL5SASIR4HJ3PXA6WBANCNFSM4HK37EXA>
.
|
I'm submitting a...
Browser:
Library version
The text was updated successfully, but these errors were encountered: