The MemberMouse Google login extension will allow your customers to create a new membership using their Google login credentials.
- Creating A Google App
- Configuring The Google Login Extension
- Adding Google Signup And Login To Your Site
- Troubleshooting
Creating A Google App
The first step to enabling the Google login extension on your site is to create a Google App. To create your app, follow these steps:
- First, you need to create a project. To access the Google developers page, visit https://console.developers.google.com/project. If you have previously created Google applications, you will see them here.
Click Create Project. - You will have to fill out some information about your new project:
Once you click 'Create' then you will be taken inside the IAM and Admin for your project. - Click the three bar navigation menu on the top left, then click Credentials under APIs & Services.
- Click Create Credentials and OAuth client ID:
- The second Credentials section will load:
Authorized Javascript Origins: This is your base site URL (as used in your MemberMouse license)
Authorized Redirect URL: This is the URL you see on the MemberMouse Google configuration screen:
During the setup process, it may ask you to go to an additional configuration screen to set your name, and authorized domain:
Email Address: This is the address of the gmail account you are using,.
Product name shown to users: Usually this is your website name. This is what Google will list on the access request for the user to confirm.
Homepage URL: This will be your website homepage, it is optional
Product Logo: Your logo is optional, but it will appear on the request
Privacy Policy URL: This is optional
Terms of service URL: Also Optional
Once you have completed the OAuth Client ID screen, - Click Create. Your client ID and secret will be displayed.
- Open up a new tab on your web browser, and move to configuring the Google Login Extension.
Configuring The Google Login Extension
To enable the Google login extension, follow the steps below:
- In the MemberMouse menu, click on General Settings.
- Next, click on the Extensions tab and from the following page, click on the Google logo.
- You will need to provide some information from your Google app, as well as make a few selections:
Client ID - From your Google project dashboard.
App Secret - From your Google project dashboard.
Allow Signups? - If you want to allow new customers to sign up using their Google login credentials, then click this box. Otherwise, members will only be able to login using their Google credentials, but not sign up for a new membership.
Membership Level - Customers can only signup for a free membership level when they are using their Google login credentials. Once they are members, they can purchase a paid membership. You need to select the default free membership you would like customers to join when using Google.
Callback URL: - This is the URL that is used in the Google project in the steps above. - Click Save Configuration.
Adding Google Signup And Login To Your Site
Once you have configured your site to accept Google login, you need to add the following SmartTags to allow for signup and login:
The following SmartTag generates a button that customers can use to sign up for a new account:
Attributes:
Optional Attributes:
Read this article to learn how to find your membership level IDs.
Signup Button SmartTag
The following SmartTag generates a button that customers can use to sign up for a new account:
[MM_Social_Signup_Button provider='Google']
Attributes:
provider
- Set the provider
attribute to all
to generate signup buttons for all active social login providers, or you can use an individual tag for each provider Twitter
, Facebook
and Google
. For example:[MM_Social_Signup_Button provider='all']
Optional Attributes:
membershipLevel
- You can optionally use this attribute to override the default signup membership level defined above. It takes a membership level ID for free membership levels only. For example:[MM_Social_Signup_Button provider='Google' membershipLevel='2']
Read this article to learn how to find your membership level IDs.
Login Button SmartTag
The following SmartTag generates a button that customers can use to log into an existing account:
[MM_Social_Login_Button provider='Google']
Attributes:
provider
- Set the provider
attribute to all
to generate signup buttons for all active social login providers, or you can use an individual tag for each provider Twitter
, Facebook
and Google
. For example:[MM_Social_Login_Button provider='all']
MM_Form Section Update
If you installed MemberMouse prior to version 2.2.0, and you want to use the SSO extension, you will also need to add the code below to your login core page (read this article to learn more about the login core page)
[MM_Form_Section type='socialLogin']
<div id="mm-social-login-section" class="mm-myaccount-module">
<div id="mm-social-login-header" class="mm-myaccount-module-header">
Social Networks
</div>
<div class="mm-myaccount-content-wrapper">
<div id="mm-social-login-body">
[MM_Form_Data name='socialLogin']
</div>
</div>
</div>
[/MM_Form_Section]
Troubleshooting
This means that the URL listed is not configured with Google as an authorized redirect URI. To fix this, go to the Google Developers Console, click APIS & AUTH > Credentials and then make sure that the URI in the error message above is pasted in the Redirect URIs area on this page. The URI Google is referring to in the error message needs to be included here exactly as it appears in the error message.