Open nikhilweee opened 2 months ago
@pamelafox Would you consider commenting on this issue? Thank you!
I actually just implemented that today! Here's how I did it for Django: https://github.com/pamelafox/django-quiz-app/pull/53/files#diff-349d3196c8f51b935294f476e30a9ba340b7e1256c9de27e108247bb0c079c28
I need to check my deploy in 24 hours and confirm it's still working, however.
get_token()
will only be called once when the app starts. What's the best way to periodically refresh tokens? I see a line that suggests writing a django middleware. Is there an example available? https://github.com/Azure-Samples/msdocs-django-web-app-managed-identity/blob/c6ca188c2b6c93e0852dae5e9f8112852b2aebcf/azureproject/get_token.py#L5