I was reading the documentation for the new "Sign In with Google" (https://developers.google.com/identity/gsi/web/reference/html-reference). However, I'm unable to find a way to restrict login to a specific hosted domain i.e. if my college uses Google Workspace accounts with their own domain, I'd like to restrict login to only those accounts.
Note: This is what I used earlier on.
To restrict sign-ins to users of your own organization's Cloud Identity or Workspace account, you can set the OAuth consent screen to internal.
To restrict sign-ins to a set of domains, extend your app to check the hd claim in the ID token, which contains:
The hosted G Suite domain of the user. Provided only if the user belongs to a hosted domain.