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 refresh token support for Azure AD OAuth provider #1599

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SigveSjovold
Copy link

Description

This PR adds support for handling refresh tokens in the Azure AD OAuth provider. This enables applications to maintain long-term access to Azure AD resources without requiring users to re-authenticate.

Changes

  • Added refresh token retrieval in get_token method
  • Store refresh token in provider instance
  • Include refresh token in user metadata
  • Added offline_access scope to enable refresh token support

Testing

I have tested these changes by:

  • Authenticating with Azure AD
  • Verifying refresh token is properly retrieved
  • Confirming refresh token is accessible in user metadata

- Store refresh token from OAuth response in provider instance
- Add refresh token to user metadata in get_user_info method
- Enable offline_access scope to receive refresh tokens

This enhancement allows applications to persist refresh tokens
for maintaining long-term access to Azure AD resources.
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. auth Pertaining to authentication. backend Pertains to the Python backend. labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Pertaining to authentication. backend Pertains to the Python backend. size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant