How to restrict Google logins to specific email domains


I’m creating a website that is meant to be exclusively used for students at my university.

I want to use Google API as a login, and have it so that students can only log in using their account through google.

This is helpful, because I can get their real name, and have a way to restrict access only to students that go to my university.

Is there any way to achieve this through Thanks!

Yes, sure you can do easy. The next step after the Oauth login, you check the e-mail domain, and send a logout and delete the user if does not match with the specific domain.