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.

Scopes missing in /docs at each endpoint padlock

See original GitHub issue

Describe the bug Scopes are missing if we select padlock symbol next to each api endpoint while trying to authorize. they do appear when we select authorize button at the top.

To Reproduce use below azure scheme

azure_scheme = SingleTenantAzureAuthorizationCodeBearer(
    app_client_id=settings.APP_CLIENT_ID,
    tenant_id=settings.TENANT_ID,
    scopes={
        f'api://{settings.APP_CLIENT_ID}/user_impersonation': 'user_impersonation',
    }
)

use this scheme as a dependency to your endpoint

app.include_router(api_router, prefix=settings.API_V1_STR, dependencies=[Security(azure_scheme, scopes=['user_impersonation'])])

go to /docs image

you can see scopes when you click authorize button

image

if you click on padlock below scopes are missing

image image

and unable to authorize as I am getting below error…

image

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
JonasKscommented, Nov 11, 2022

@Pkumar-1988 , we have to wait for FastAPI maintainers (tiangolo specifically) to respond first. If they accept and merge, I’ll have to edit how we handle scopes in this package, since Azure don’t accept and respond with the same kind of scopes (unfortunately).

In other words: I have no idea, it is in FastAPIs hands now. 😊

0reactions
Pkumar-1988commented, Nov 11, 2022

wow… that was too quick… thank you for the PR… do you know when it will be pushed to artifactory

Read more comments on GitHub >

github_iconTop Results From Across the Web

Show required OAuth scopes on each endpoint #5062 - GitHub
The API I am documenting has a lot of scopes available. However, a single endpoint usually only requires one scope. Currently a padlock...
Read more >
Working with OAuth2 scopes | Apigee X - Google Cloud
If Apigee is not configured to check for scope (the <Scope> element is missing from the VerifyAccessToken policy or it is empty), then...
Read more >
Scopes - Auth0
When an app requests permission to access a resource through an authorization server , it uses the scope parameter to specify what access...
Read more >
Using OAuth 2.0 to Access Google APIs | Authorization
Refer to the documentation for each Google API for the scopes required for ... The Google OAuth 2.0 endpoint supports web server applications...
Read more >
OAuth API verification FAQs - Google Cloud Platform Console ...
All apps that access Google APIs must verify that they accurately represent ... For a complete list of Google APIs, see OAuth 2.0...
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