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

How to renew the access_token (using the refresh_token)? #501

Open
afmorielo opened this issue Jul 17, 2023 · 0 comments
Open

How to renew the access_token (using the refresh_token)? #501

afmorielo opened this issue Jul 17, 2023 · 0 comments

Comments

@afmorielo
Copy link

afmorielo commented Jul 17, 2023

I have a web application, A, that utilizes mozilla-django-oidc 3.0.0 to authenticate with an OIDC provider, specifically Keycloak. Application A needs to communicate with application B, which does not use mozilla-django-oidc, but also authenticates with the same OIDC provider.

In the request sent from application A to application B, we include the access_token of the logged-in user. This access_token is then used by application B to grant access to protected resources.

Everything is functioning correctly, except for the issue that the access_token expires. When this happens, we are currently unable to use mozilla-django-oidc to automatically renew the access_token using the refresh_token.

As a temporary solution, we have made a small modification in the auth.py file to store additional variables in the Django Session. Later on, we utilize these variables in a custom function that we created specifically to handle the renewal of the access_token.

modify_mozilla_django_oidc

My question is: does mozilla-django-oidc provide any built-in functionality or feature to handle this specific case?

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

No branches or pull requests

1 participant