$100 Website Offer

Get your personal website + domain for just $100.

Limited Time Offer!

Claim Your Website Now

How to Configure Google Login in flarum?

Using fof/oauth

To configure Google Login in Flarum using the FoF OAuth extension, follow the step-by-step instructions below. This guide assumes that you have already installed the FoF OAuth extension and have access to the Google Developer Console to create OAuth credentials.

Step 1: Install the FoF OAuth Extension

If you haven’t already installed the FoF OAuth extension, you can do so via Composer.

  1. SSH into your server where Flarum is installed and navigate to the Flarum root directory.
  2. Run the following command to install the FoF OAuth extension:

Run the following command to install the FoF OAuth extension:

composer require fof/oauth

Once the installation is complete, clear Flarum’s cache:

php flarum cache:clear
  1. Go to your Flarum Admin Panel (https://yourdomain.com/admin), navigate to the Extensions tab, and enable the FoF OAuth extension.

Step 2: Create Google OAuth Credentials

You need to create Google OAuth 2.0 credentials for your Flarum forum to enable Google login.

  1. Go to the Google API Console:
  2. Create a new project:
    • In the top-right corner, click the Project dropdown and select New Project.
    • Give your project a name (e.g., “Flarum Google Login”) and click Create.
  3. Enable the OAuth API:
    • In the API Library, search for “Google Identity Platform”.
    • Click Enable.
  4. Configure the OAuth Consent Screen:
    • Go to APIs & Services > OAuth Consent Screen on the left sidebar.
    • Choose External as the user type and click Create.
    • Fill out the required fields, such as App name, User support email, and your developer contact email.
    • Add scopes such as email and profile, which are needed to authenticate users.
    • Save the configuration.
  5. Create OAuth 2.0 Credentials:
    • Go to APIs & Services > Credentials, then click Create Credentials and choose OAuth 2.0 Client IDs.
    • Set the Application Type to Web Application.
    • In Authorized redirect URIs, add the following URL (replace yourdomain.com with your actual domain): https://yourdomain.com/auth/google/callback
    • Click Create and note down the Client ID and Client Secret that you receive, as you’ll need them for the next step.

Step 3: Configure Google Login in Flarum

Configure Google OAuth:

  • After installing the extension, go to your Flarum Admin Panel (https://yourdomain.com/admin).
  • Navigate to Extensions, find the FoF OAuth extension, and enable it.
  • Configure the OAuth credentials by going to Settings > Login Providers > Google OAuth and entering the Client ID and Client Secret you generated earlier from the Google Developer Console.

  1. Go to your Flarum Admin Panel:
    • Log in as an admin and navigate to the Settings page.
  2. Find the OAuth Providers Section:
    • Scroll down to the Login Providers section.
    • You should see the Google OAuth option provided by the FoF OAuth extension.
  3. Enter the Google OAuth Credentials:
    • Enter the Client ID and Client Secret you obtained from the Google Developer Console in the respective fields.
    • For the Redirect URL, it should be pre-configured as https://yourdomain.com/auth/google/callback.
  4. Save the Changes:
    • Click Save to apply the changes.

Step 4: Test the Google Login Integration

  1. Visit your Flarum Forum:
    • Go to your forum’s homepage (https://yourdomain.com).
  2. Click on “Login”:
    • On the login page, you should now see a Login with Google option.
  3. Test the Google Login:
    • Click Login with Google and try signing in using a Google account.
    • If everything is configured correctly, you should be able to log in using your Google credentials.

Related Posts

Navigating Legal Care in India: How to Evaluate Advocates, Practice Areas, and Consultations

Introduction Facing a legal question, business compliance issue, or court dispute can feel overwhelming. Whether you are dealing with a property transaction, a family dispute, an employment…

Read More

Navigating International Dental Care: How to Evaluate Hospitals, Dentists, and Treatment Abroad

Introduction Choosing a dental provider is one of the most critical health decisions a person can make, especially when considering travel outside one’s home country. Today, millions…

Read More

Navigating Modern Indian Taxation, Business Compliance, and Strategic Financial Advisory

Introduction Managing personal finances, scaling a startup, or running an established corporate enterprise in India requires strict adherence to an evolving regulatory landscape. From seasonal tax updates…

Read More

Navigating the Modern Event Ecosystem: Event Discovery, Digital Ticketing, and Management in Bangalore

Introduction Bangalore—often celebrated as India’s Silicon Valley and cultural melting pot—pulses with non-stop energy. On any given day, thousands of working professionals, students, creators, startup founders, and…

Read More

Evaluating Business Software, AI Platforms, and Enterprise Technology Solutions

Introduction The modern enterprise software ecosystem is expanding at an unprecedented rate. From cloud-native SaaS applications and AI-driven workflow engines to complex infrastructure management frameworks, technology leaders…

Read More

Enterprise AI Training and Certification Guide for Modern Professionals

Introduction Artificial intelligence has rapidly evolved from an experimental sandbox project into a fundamental core infrastructure requirement for global enterprises. Organizations across every sector are no longer…

Read More
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x