Skip to main content
With Google login on, the login and registration pages show a Google button. You create an OAuth client in Google Cloud, then paste its Client ID and Client secret into Auth Settings. No .env changes are needed. MagicPost asks Google for the openid, profile and email scopes. Google must return an email address, otherwise the sign-in is refused.
This is sign-in for your own users. To publish to a YouTube channel you use a different set of credentials. See YouTube.

Before you start

  • You can sign in to the MagicPost admin panel.
  • You have a Google account that can use the Google Cloud Console.
  • Your site runs on its public https address.

Step 1. Copy the Callback URL

1

Open Auth Settings

Go to Admin → Backend Settings → Auth Settings and scroll to the Google section.
2

Copy the Callback URL

Copy the value of the read-only Callback URL field. It looks like https://your-domain.com/auth/google/callback. You paste it into Google Cloud next.

Step 2. Create the OAuth client in Google Cloud

Google groups these settings under Google Auth Platform. The tabs are Branding, Audience, Clients and Data Access.
1

Pick a project

Open the Google Cloud Console. In the project picker at the top, create a project or select an existing one.
2

Set up the consent screen

Open Google Auth Platform from the navigation menu. If the project is new, click Get started and complete the wizard:
  • App Information: enter an App name and a User support email.
  • Audience: choose External so any Google account can sign in.
  • Contact Information: enter an email address for Google to reach you.
  • Agree to the policy and click Create.
3

Add the scopes

Open Data Access and click Add or remove scopes. Select openid, .../auth/userinfo.email and .../auth/userinfo.profile, then click Update and Save.
4

Create the client

Open Clients and click Create client. Set Application type to Web application and give it a name. Under Authorized redirect URIs, click Add URI and paste the Callback URL from Step 1. Leave Authorized JavaScript origins empty, because MagicPost does not use them. Click Create.
5

Copy the credentials

Copy the Client ID and the Client secret shown after the client is created.
Google shows the client secret only right after you create the client and does not show it again. Store it before you close the dialog. If you lose it, create a new client.
6

Publish the app

Open Audience. While the publishing status is Testing, only the test users you list can sign in. Click Publish app so everyone can.

Step 3. Configure MagicPost

1

Turn on the master switch

On Admin → Backend Settings → Auth Settings, switch on Login via Social (oAuth). It saves as soon as you toggle it.
2

Enable Google and fill in the credentials

In the Google section, switch on Enable Google Login and fill in:
  • Google Client ID: the Client ID from Google.
  • Google Client Secret: the Client secret from Google.
  • Google Redirect URL: the same address as Callback URL.
3

Save

Click Save. The toast reads Settings were saved successfully.

Test it

  1. Open your site’s login page in a private browser window.
  2. Click Google under or continue with.
  3. Choose an account and approve.
  4. You land on the dashboard. The registration page offers the same button under or sign up with.

Troubleshooting