Use Oauth2+Django to get authorization toaccess user's Gmail
I was using this tutorial: https://www.geeksforgeeks.org/python-django-google-authentication-and-fetching-mails-from-scratch/. However, the oauth2client library is deprecated and hasn't been touched in almost 9 years. I have looked for various tutorials, but they seem to be written by AI; they make no sense, and do things like tell you to include credentials in a piece of code that does not use credentials.
So my question is, how can I implement oauth2 into my Django application so that user's can go to the Django website and give permission to read their emails?