Skip to content
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

add Azure OAUTH example to security docs #1835

Closed
thesuperzapper opened this issue Apr 25, 2022 · 2 comments · Fixed by #1837
Closed

add Azure OAUTH example to security docs #1835

thesuperzapper opened this issue Apr 25, 2022 · 2 comments · Fixed by #1837

Comments

@thesuperzapper
Copy link
Contributor

thesuperzapper commented Apr 25, 2022

Currently, we don't list an Azure OAUTH example for in the security docs for OAUTH_PROVIDERS.

However, we already have an example for Azure OAUTH in the ./examples/oauth/config.py file, so we can probably copy that example into ./docs/security.rst to help users understand that this is an option.

For example: (derived from ./examples/oauth/config.py)

OAUTH_PROVIDERS = [
...
...
...
{
    "name": "azure",
    "icon": "fa-windows",
    "token_key": "access_token",
    "remote_app": {
        "client_id": "AZURE_APPLICATION_ID",
        "client_secret": "AZURE_SECRET",
        "api_base_url": "https://login.microsoftonline.com/AZURE_TENANT_ID/oauth2",
        "client_kwargs": {
            "scope": "User.read name preferred_username email profile upn",
            "resource": "AZURE_APPLICATION_ID",
        },
        "request_token_url": None,
        "access_token_url": "https://login.microsoftonline.com/AZURE_TENANT_ID/oauth2/token",
        "authorize_url": "https://login.microsoftonline.com/AZURE_TENANT_ID/oauth2/authorize",
    },
},
...
...
...
]
@thesuperzapper
Copy link
Contributor Author

I have raised a PR to add these docs #1837

@Narender-007
Copy link

Narender-007 commented Aug 1, 2023

Currently, we don't list an Azure OAUTH example for in the security docs for OAUTH_PROVIDERS.

However, we already have an example for Azure OAUTH in the ./examples/oauth/config.py file, so we can probably copy that example into ./docs/security.rst to help users understand that this is an option.

For example: (derived from ./examples/oauth/config.py)

OAUTH_PROVIDERS = [
...
...
...
{
    "name": "azure",
    "icon": "fa-windows",
    "token_key": "access_token",
    "remote_app": {
        "client_id": "AZURE_APPLICATION_ID",
        "client_secret": "AZURE_SECRET",
        "api_base_url": "https://login.microsoftonline.com/AZURE_TENANT_ID/oauth2",
        "client_kwargs": {
            "scope": "User.read name preferred_username email profile upn",
            "resource": "AZURE_APPLICATION_ID",
        },
        "request_token_url": None,
        "access_token_url": "https://login.microsoftonline.com/AZURE_TENANT_ID/oauth2/token",
        "authorize_url": "https://login.microsoftonline.com/AZURE_TENANT_ID/oauth2/authorize",
    },
},
...
...
...
]

is this working ?

have got upn key error please tell how to resolve it.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants