How to authorize a Gmail account with Oauth to send verification emails with django-allauth

So from 2025 less secure apps are going to be disabled and i can't figure out how to integrate gmail account with django-allauth anymore in order to send verification emails. I have OAuth consent screen and credentials, Client_id, Client_secret but i don't understand how can I use this gmail account with django.

I know i lack code here, but literally didn't get anywhere other than creating an account in google console and activating OAuth/Credentials. Been searching for any guide online but they are all using less secure apps.

Tried something with https://docs.allauth.org/en/dev/socialaccount/providers/google.html but not even sure if this has anything to do with logging in an account into the app and sending emails using that account

I also encountered an issue when trying to send email verifications. Specifically, you need a Gmail account that won't ends with @gmail.com. If you're using a different type of Gmail, such as a college or office email (e.g., charitra.shrestha@patancollege.edu.np), it may support less secure apps in its settings.

For accounts like these, you may need to enable App Passwords in the Gmail settings. If you'd like, I can provide my Gmail for testing purposes. Feel free to message me on Instagram (https://www.instagram.com/_charitraa_/), and I’ll share my Gmail to help you test the email verification process.

Alternatively, you can enable App Passwords on my another account and try it yourself. i have two account of my college.

Verification.enter image description here

enter image description here

Back to Top