Login with X (Formerly Twitter)

Imagine you’re running an awesome WordPress site, and you want visitors to log in using their X (formerly Twitter) accounts. It’s simple, quick, and avoids the hassle of creating new passwords. You can do it yourself...

Imagine you’re running an awesome WordPress site, and you want visitors to log in using their X (formerly Twitter) accounts. It’s simple, quick, and avoids the hassle of creating new passwords. You can do it yourself using Happy Social Login, and I’m here to show you how to do it quickly.

Here’s the step-by-step guide to get X login up and running.

Step 1: Enable X Login in Happy Social Login #

Head back to your WordPress dashboard:

  1. Go to Happy Social Login > Providers > X.
  2. Make sure to enable X

Step 2: Create an X App #

To allow users to log in with X, we first need to create an X App. Don’t worry, I’ll walk you through it!

  1. Go to X Developer Portal: Head over to https://developer.twitter.com/en/portal/projects-and-apps.
  2. Log in: Use your X account credentials to log in. If you don’t have an account yet, create one. It’s quick and easy.
  3. Apply for a Developer Account: If you don’t have a developer account, apply for one by filling in the required details. You need this to proceed.
  4. Go Back to Developer Portal: Once your developer account is approved, go back to the developer portal.
  5. Add a Project: Click on the “+ Add Project” button.
  6. Name Your Project: Give your project a name and provide a brief description of how you’ll use it. Select your use case, then click Next.
  7. Choose App Environment: Select “Production” for the App environment and press Next.
  8. Name Your App: Enter a name for your app and click Next.

Now you’ve created your X App! The next step is to grab the API keys to connect it with Happy Social Login.

Step 3: Get API Keys #

On the page with your App information:

  1. Find API Keys: Copy the API Key and API Key Secret.
  2. Add API Keys to Happy Social Login: Head over to your WordPress dashboard and go to Happy Social Login > X > Settings. Paste the API Key and API Key Secret into the corresponding fields and click Save Changes.

Step 4: Set Up User Authentication in X #

Now we need to set up authentication for your X App.

  1. Go Back to Your X Project: In the developer portal, find your App under the Projects & Apps section and click on its name.
  2. Scroll Down to User Authentication Settings: Click on the Set up button.
  3. Choose App Permissions: Select the Read permission.
  4. Request Email (Optional): If you want to get your users’ email addresses, enable the Request email from users option. Make sure to fill in your Terms of Service and Privacy Policy URLs.
  5. Select App Type: Choose “Web App, Automated App or Bot” for the Type of App.
  6. Enter Redirect URL: In the Callback URI / Redirect URL field, enter https://yoursite.com/sso/x.
  7. Add Your Website URL: In the Website URL field, enter your site’s URL (e.g., https://yoursite.com).
  8. Save Settings: Click Save to confirm your changes.

Step 5: Verify API settings #

  1. paste the API keys got from above step.
  2. Verify the settings and you are done.

Conclusion #

And that’s it! You’ve successfully added X login to your Elementor site using Happy Social Login. Now, your visitors can log in with their X accounts in just one click, making their experience smoother and quicker.