Allow Users to Login to your Website via Google Follow
When enabled, your users can optionally sign in using their Google login. You can set it up to either require that they use a corporate Google account, or they can use a personal Google account. For your Public B2C site, you may decide to let your customers login with their personal google accounts, while some of your B2B Corporate Accounts that use Google as theirSingle Sign-On would want to limit their users to only login with their Company Google account.
The instructions below are for setting up a Google Login for customers using their own personal Google accounts. If you are wanting to connect a Corporate account to MyOrderDesk, then most likely all of this has already been set up by your Google Administrator, and you just need to turn it on in MyOrderDesk. If that is the case, you can jump to Step #5 at the bottom of this document to see where you turn this on for your users.
Please note: While it is very easy to enable this option in MyOrderDesk, the setup on the Google side does require some technical knowledge. We will do our best to guide you through that process (as it was laid out at the time of our writing), but you will need to contact Google for any help that might be needed beyond what is provided in this document. There are also many help articles and videos available by doing a search.
1. Create a Project.
- Go to https://console.developers.google.com and select Create a Project from the Dashboard.
- In Project Name, give your project a Name.
- Google will give you a Project ID, which you can leave, or edit to something else you would like. Once created, it can not be changed later.
- Select Browse in the Location window, and then in the popup window, click on No organization.
- Click on Select at the bottom of the window.
- Click Create when the window closes and you return to the New Project screen.
2. Setting up OAuth Consent
- From the Dashboard, select OAuth Consent Screen
- User Type will be External, which makes the login available to any user with a Google account.
- Select Create. A new page will display.
- App information (You created a project, now you are going to create your app under that project).
- Give your app a name. The name of the app asking for consent (ie: Your company name). This is something your users will see when the screen comes up to say XX is asking for access to your Google account.
- Enter an email address for users to contact you with questions about that consent.
- Upload a Logo if you'd like.
- App Domains
- Provide users a link to your home page in the Application Home Page field.
- If you have a privacy policy and terms of service page on your website (highly suggested) you can enter the links in the next two boxes as well.
- Authorized domains
- Select the option to Add Domain
- Enter the Domain of your Storefront
- Developer Contact Information
- Enter an email address to your technical contact. This is in case Google needs to notify you about your project. Save and Continue
- Scopes - We do not use Scoping so this section can be skipped.
- Test Users is optional.
- When done, select Save and Continue. A summary of the options you selected will be displayed. When done reviewing the information, click on Back to Dashboard.
3. Setting up the Credentials
- From the Dashboard, select Credentials
- Select Create Credentials
- Choose OAuth client ID
- In the Application Type dropdown, select Web application.
- Select Create.
- Once created, you will be presented with a popup window with your Client ID and your Client Secret.
- Make note of your Client ID. You will need it when enabling Google in MyOrderDesk.
- Select OK.
- While still in the Credentials area, you have two more areas to complete.
- Setup Authorized JavaScript origins for use with requests from a browser.
- Select Add URL
- Enter your domain address (using https://).
- Setup Authorized redirect URLs
- Select Add URL
- Enter your domain address of your sign in page (ie: https://myorderdesk.com/login).
4. Publish your App
Select the Publish App link under Testing - Your app will be available to any user with a Google Account. Select Confirm.
5. Activate the Google option in MyOrderDesk
- Go to MyOrderDesk Admin > Site Settings > Options > Sign Up & Security.
- Navigate to, and select the option Enable Sign In with Google
- Enter your Client ID that we saved when creating your credentials.
- The Domain is the domain you want to restrict logins to. This is used for a company Google account situation that we discussed at the beginning of this document. If you are allowing users to login with the personal Google accounts, leave this blank.
6. Test it out!
- Select Sign-In from your Storefront.
- You should now see a Google Sign In Logo.
- Click on the new Sign in button.
- You should be logged into the storefront.
- You are done!