Sign in with Google for specific organisation domain

Question:
How can I implement Google Sign-In for a specific organization domain in Wix Studio?

Product:
Wix Studio

What are you trying to achieve:
I am trying to implement a Google Sign-In feature on my Wix site that restricts sign-ins to users from a specific organization domain (e.g., @myorganization.com). I want to ensure that only users with an email address from this domain can sign in. I have seen the functionality to add secrets in Wix Studio for storing the client secret and ID, but I haven’t stored them yet. I need guidance on how to configure the Google Sign-In to restrict it to a specific domain.

What have you already tried:

  • I have set up OAuth 2.0 credentials in the Google Developer Console.
  • I have read through the Wix Studio API documentation and the Google Identity documentation.
  • I have searched the Wix forums and Google support forums but haven’t found a clear solution specific to restricting the sign-in to a particular domain.

Additional information:

  • I am familiar with basic OAuth concepts.
  • Any sample code snippets, detailed steps, or references to relevant Wix APIs would be greatly appreciated.
  • If there are any third-party tools or plugins that could facilitate this process within Wix Studio, please let me know.

Thank you for your assistance!

Wix wouldn’t handle Google setting up domain/email restrictions, that would need to be handled on Google’s side.

Another option would be to make your own custom login flow and setup your business logic on who can/can’t join in Velo using the wix-members library and Velo web modules. Though this is a bit more involved so I’d see what limitations Google’s SSO can set first.

1 Like