question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Swagger Auth Failing

See original GitHub issue

Hi there,

Auth is working fine through the MVC app, can login and view catalog and marketing.

When trying to auth through the Swagger UI on the marketing, location or ordering API’s I get Sorry, there was an error : unauthorized_client

In swagger I select the ‘Authorize’ button and in the popup I leave all at default and submit but get the error. Even If I check the scopes button I get the error?

What am I doing wrong?

Windows 10, Docker CE 18.03.0 VS 2017 15.7.0 Preview 4

Thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:32 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
mvelosopcommented, Apr 24, 2018

Hi @darnoldi, I was having the same problem.

I think I found the cause, a quick fix and why @VladislavAntonyuk doesn’t have the same problem.

Checking the logs I got to this suspect: image

So I checked the code and that value is set in Identity.Api/Configuration/Config.cs: image

But changing the code there didn’t fix the problem, so looking at the database I got to this table: image And setting the attempted value there did the trick!

This is definitely a bug, with just a quick fix (at least in my case), please let us know if this works for you.

@VladislavAntonyuk I’m guessing you didn’t have this problem because you probably haven’t recreated the SQL Server container for some time so you might have the proper values in that table. Could you please confirm?

We have to dig around a little to check what’s the correct value for the redirection, because it might have changed now that we are using the API Gateway.

@eiximenis could you please take a look at this?

1reaction
randomkmscommented, Jan 22, 2022

It was fixed for me by changing Swagger url in browser from http://localhost:5102/swagger/index.html to http://host.docker.internal:5102/swagger/index.html

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to authenticate to Swagger UI
The issue occurs when TLS connection is established with the database. ... Cause. The root cause is incorrect url being used in cfgapi.properties ......
Read more >
Swagger UI Auth Error on AuthorizationCode flow
I have configured SwaggerUI to use AuthorizationCode flow with LinkedIn. Here is my configuration. Startup.cs CongfigureServices method:
Read more >
Auth code not cleared after login, second authorization ...
I've yet to verify my hypothesis but I suspect that Swagger UI is not clearing the auth code upon logout. So when the...
Read more >
Authorization error from SWAGGER
I am trying to retrieve segment data from STRAVA using an API. But when I authorize my client ID and secret from SWAGGER....
Read more >
LDAP config attempt via Swagger API , Local users such as ...
Mistake made during LDAP config attempt via Swagger API · Local users such as admin UI login no more working : Authentication Failed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found