You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I'm facing an issue with handling OAuth2 tokens with the Azure azure-ad provider. When a user session extends beyond the lifetime of the access_token, the token expires, and it seems there is no built-in method in the library to handle the refresh of these tokens. This interrupts the user session and requires manual intervention to reauthorize.
Describe the solution you'd like
Automatic handling of OAuth2 access tokens.
For example, Azure has python SDKs like azure-identity and msal that automatically handle token cache and token refresh.
Describe alternatives you've considered
I have created an additional class that inherits from base class AzureADOAuthProvider and overrode the methods get_token and get_user_info, as in my scenario I need to use on-behalf-of flow. I've utilized the azure-identitycredential classes for these methods, AuthorizationCodeCredential and OnBehalfOfCredential respectively, and tried to pass them and store in the user session to be used later on for external API requests towards Azure, but no good.
Additional context
I'd very much appreciate if you can give directions on how to use the user session cl.user_session and the cl.oauth2_callback to always have refreshed access tokens towards Azure services.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I'm facing an issue with handling OAuth2 tokens with the Azure
azure-ad
provider. When a user session extends beyond the lifetime of theaccess_token
, the token expires, and it seems there is no built-in method in the library to handle the refresh of these tokens. This interrupts the user session and requires manual intervention to reauthorize.Describe the solution you'd like
Automatic handling of OAuth2 access tokens.
For example, Azure has python SDKs like
azure-identity
andmsal
that automatically handle token cache and token refresh.Describe alternatives you've considered
I have created an additional class that inherits from base class
AzureADOAuthProvider
and overrode the methodsget_token
andget_user_info
, as in my scenario I need to use on-behalf-of flow. I've utilized theazure-identity
credential classes for these methods,AuthorizationCodeCredential
andOnBehalfOfCredential
respectively, and tried to pass them and store in the user session to be used later on for external API requests towards Azure, but no good.Additional context
I'd very much appreciate if you can give directions on how to use the user session
cl.user_session
and thecl.oauth2_callback
to always have refreshed access tokens towards Azure services.The text was updated successfully, but these errors were encountered: