Skip to main content

Lesson 1 of 5 · 4:10 · Beginner · Webflow

Add Google login

Let members sign up and log in with their Google account.

Where this journey starts

Gated content ended with your site going live on email and password logins. This journey adds the login options members expect, starting with Google.

By the end of this lesson you can

  • Create a Google Cloud project and OAuth consent screen with memberstack.com as an authorized domain
  • Create an OAuth client ID using the redirect URI from Memberstack
  • Paste the client ID and secret into Memberstack’s auth providers
  • Set your Webflow signup button’s social auth type to Google

Heads up: Most of this happens in the Google Cloud console. The video skips test users, which matter while your Google app is still in testing.

Lesson notes

How it works

How Google login works with Memberstack

When a member clicks Continue with Google, Memberstack sends them to Google to sign in. Google then sends them back to Memberstack's callback address with proof of who they are, and Memberstack logs them in or creates their account. For that handoff to work, Google needs an OAuth app that trusts Memberstack's callback, and Memberstack needs that app's client ID and client secret.

There is now a quicker path: enable Google in Memberstack without entering a client ID or secret, and it uses Memberstack's own credentials. The steps below are the custom setup, which you need if you want the login under your own Google project.

Setting up the Google Cloud side

Google's console labels move around, so follow the names below rather than the exact position on screen.

  1. In the Google Cloud Console, create a new project.
  2. Go to APIs & Services, OAuth consent screen. Fill in the app name and support email, choose External as the audience, add a developer contact email and create it.
  3. Create an OAuth client ID with Web application as the application type.
  4. Under Authorized redirect URIs, add https://client.memberstack.com/auth/callback, or https://memberstack-client.yourdomain.com/auth/callback if you've set up a custom domain in Memberstack.
  5. Copy the client ID and client secret.
  6. Under Branding, add your domain to Authorized domains.
  7. Under Audience, publish the app when you're ready for the public. While it's in testing, only test users you add can log in, up to 100.

Connecting Google in Memberstack and Webflow

In Memberstack, go to Settings, Auth Providers and click Configure next to Google. Paste the client ID and client secret, turn Google on and save.

In Webflow, the Google button must sit inside a Memberstack signup form, the form with data-ms-form="signup". Memberstack's Social Auth Components include light and dark Google buttons with the attributes already set. If you build your own, add data-ms-auth-provider="google" to it. Members who already have an account are logged in when they use the signup form. To let login forms create new accounts too, add data-ms-social-auth-allow-signup to your login form or login modal buttons.

Before you move on

0 of 5

Tick these off on your own site. Done with all of them? You’re ready for the next lesson.

Up next: Next you’ll do the same for Facebook, with a few extra steps on Meta’s side.

Chapters

Common questions

What redirect URI does Memberstack need for Google login?

Use https://client.memberstack.com/auth/callback. If you've set up a custom domain in Memberstack, use https://memberstack-client.yourdomain.com/auth/callback with your own domain.

Why can only some people log in with Google?

Your Google OAuth app is probably still in testing, where only the test users you add can sign in. Publish the app under Audience in the OAuth consent screen to open it to everyone.

Can I add Google login to Memberstack without a Google Cloud project?

Yes. Memberstack's quick setup lets you enable Google using Memberstack's credentials, with no client ID or secret. You can switch to your own credentials later.

Keep going

Checked against the Memberstack docs

TranscriptAuto-generated captions
  1. 0:00

    Hello everyone, this is Julian from Memberstack, and I’m going to show you how to add Google sign-up to your site, like in this example. As you can see, if I click "Continue with Google," the Google sign-up window opens. So, let’s begin. First of all, you will need three things. Of course, you need your website on Webflow, as well as a registration form with a designed " Continue with Google" button. Next, you will need an app in Memberstack.

  2. 0:30

    Just go to Memberstack.com and create an app. The steps are very simple. The entire process is fully guided . The next thing you will need is a project in Google Cloud. You need to find Google Developer Console in the search, it will be the first result where you will be asked to log in and then create an app. Here we are on this screen, let’s call it "test app". Leave everything as is and

  3. 1:00

    click "Create" . Now that it’s done, we’ll be on a screen where there’s nothing useful for us yet. Let’s click on "OAuth Consent Screen". The next thing you need to do is select " External", like this, and click "Create" . Next, give it a name. Let’s just call it "test app". Or I’ll call it that, and you’d better choose another name. Choose your email address for support. Next, here you will be asked about the logo. And for the

  4. 1:32

    authorized domain, be sure to specify Memberstack.com. Even if your domain is different, add Memberstack.com. Then, enter your email address in the developer’s contact information. So, done. After that, click "Save and continue." The next section is “ Scopes”, it sounds complicated, but don’t worry. Just click Add or Remove and select the first three options, like this. This is simply a list of what

  5. 2:02

    you will share. Click " Update", everything is fine, and "Save and Continue" again. Test users, this is important during testing. I don’t need it right now, so I’ll click " Save and Continue." The result looks good. Now let’s go back to the control panel. So, here we are, and now we just need to get our credentials. So let’s do it now. So the next thing we’re going to do is go here to credentials and click "Create

  6. 2:32

    Credentials." Then we will need to select the OAuth client ID, like this. And choose the type of our program. This is a web application. Any name you wish. Test web application, and for the authorized redirect URI. Click "Add" and then we’ll be left with this empty field. What we need to do is go to Memberstack and go into our settings. Then we have this

  7. 3:03

    authentication providers button and we see Google. Let’s click Configure and copy this. Now that it’s copied, let’s go back here and paste it. Now click " Create". So, here is our client ID and client secret. You must keep them a secret. This is just for testing and it will be deleted in a second, so it doesn’t matter. So let’s copy this, go back to Memberstack, paste the client ID, paste the

  8. 3:32

    client secret, and click Save . So, everything is ready, and the last thing you need to do is go to your Webflow site and find the button located on the registration form. If you don’t know how to create a Memberstack registration form, we have another video about it on the channel. The only thing you still need to do is select the link you placed on the registration form, click “ social authentication type,” and

  9. 4:02

    then “Google.” That’s all . After that, you will have a fully working Google registration form on your website.

This is v1 of Memberstack University, built from the tutorials we’ve put so much work into over the years. We’d like to make a more organized series.