#42

Product support

Get help in the plugin support forum.

Categories

  • Social
  • Utility

The Social Login plugin for October CMS allows customers to register and log in to your site with their Facebook, Google, Twitter and other social media accounts. The login page is completely customisable and can theme seamlessly into any October site.

Supports

  • Twitter
  • Facebook
  • Google
  • Extensible! Don't see one you want? Add it!

New! Backend login support. Check the 'Enabled on backend?' checkbox on a per-provider basis in Settings - Social Login.

Have a feature suggestion? Found a bug or need support?

Please use the contact form on my website and I'll get back to you as soon as possible. I usually respond within a few hours depending on timezone differences.

These plugin(s) are required for the plugin:

A login page with social log sign in links

Installation

This plugin relies on RainLab.User, so make sure you have that installed.

Go to System - Updates and in the search field enter Flynsarmy.SocialLogin

Usage

  • Fill in any required credentials in System - Social Login, making sure the Enabled? checkbox is ticked when you're done.
  • Add User - Account and Social Login components to your login page
  • Copy /plugins/rainlab/user/components/account/signin.htm to your themes partials/account folder
  • Where you want your login links, add
    {% for name, link in social_login_links %}
    <a href="{{ link }}">{{ name }}</a>
    {% endfor %}

    Remember that you can format it any way you like.

Settings

Sometimes you'll want to decide which page to redirect to on login/error. For example perhaps you have a log in page before checkout in an ecommerce plugin and want to redirect to the cart on login. This can be done by appending the following query string values to your login links:

Query String Param Default Description
s / Success page redirect URL (relative)
f /login Error page redirect URL (relative)

Example usage:

{% for name, link in social_login_links %}
    <a href="{{ link }}?s={{ 'home'|page }}&f={{ 'login'|page }}">{{ name }}</a>
{% endfor %}

Events

Developers can change the way logins are handled through several events detailed below.

Event Parameters Description
flynsarmy.sociallogin.handleBackendLogin array $provider_details, array $user_details, User $user Triggers before backend login. Return true to halt the login process
flynsarmy.sociallogin.handleLogin array $provider_details, array $user_details, User $user Triggers before frontend login. Return true to halt the login process
flynsarmy.sociallogin.registerUser array $provider_details, array $user_details Triggers before registering a new user for attaching to a social account. Optionally return a User object

Other Notes

Twitter doesn't return an email address, so when logging in with Twitter, a new user account is created and associated with the Twitter account.

Examples

To get your login page looking how mine is in the marketplace screenshot here's my /themes/travu/partials/account/signin.htm:

<form id="login" data-request="onSignin">
    <div class="form-group">
        <label for="userSigninEmail">Email</label>
        <input name="email" type="email" class="form-control" id="userSigninEmail" placeholder="Enter your email">
    </div>

    <div class="form-group">
        <label for="userSigninPassword">Password</label>
        <input name="password" type="password" class="form-control" id="userSigninPassword" placeholder="Enter your password">
    </div>

    <p align="right">
        or sign in with
        {% for name, link in social_login_links %}
            <a href="{{ link }}" class='login {{ name|lower }}'><i class="fa fa-2 fa-{{ name|lower }}"></i></a>
        {% endfor %}
    </p>

    <button type="submit" class="btn btn-default">Sign in</button>
</form>
  • Found the plugin useful on 30 Sep, 2017

    Had a bad day because of this plugin. Just not able to use specific 1.0.16 version. On installation, it does 1.0.18 which requires whole system to be upgraded (which currently is throwing errors). Anyway I can just use the 1.0.16?

  • Found the plugin useful on 21 Apr, 2017

    Works as expected. Thank you!

  • Found the plugin useful on 7 Apr, 2017

    Usefull but facebook changed it's login API so need to update the plugin because now it's not working.

  • Found the plugin useful on 3 Jul, 2016

    Super useful, only one problem, login only one user, i hope so fixed this.

  • Found the plugin useful on 3 Aug, 2015

    Great contribution to the community. Easy to set up and use. Thanks!

  • Found the plugin useful on 6 Jul, 2015

    Hello. Great job! It would be nice if can set permissions on backend.

    Thanks

  • Found the plugin useful on 12 Mar, 2015

    hi does this plugin has been updated as per RC? i have purchased this plugin and want to use with RC of OctoberCMS.

  • author

    Replied on 4 Jun, 2015

    Yes this plugin works with the RC (now 1.0).

  • Found the plugin useful on 7 Jan, 2015

    It's useful, thank you.

  • Found the plugin useful on 6 Dec, 2014

    Extensible! Don't see one you want? Add it! could you provide some documentation to add another social media for this one thanks for great plugin !!

1.0.19

Add backend permission requirement

Oct 15, 2017

1.0.18

!!! Requires October build 420 or higher.

Aug 27, 2017

1.0.17

Fixed issue registering new users

May 01, 2017

1.0.16

!!! Important update with breaking changes.

Apr 29, 2017

1.0.15

Compatibility fix with RainLab.GoogleAnalytics

Feb 01, 2017

1.0.14

Singleton trait fix

Feb 15, 2016

1.0.13

Deprecated code fix, settings page fix

Feb 15, 2016

1.0.12

Update login providers

Feb 15, 2016

1.0.11

Modified table key name

Dec 21, 2015

1.0.10

Don't add multiple Google associations to users

Apr 24, 2015

1.0.9

Google login fix

Mar 15, 2015

1.0.8

RC compatibility update

Feb 21, 2015

1.0.7

Rename login to username to match RainLab.Users latest update

Oct 16, 2014

1.0.6

Add login details when registering users

Oct 08, 2014

1.0.5

Fix password confirmation error

Sep 03, 2014

1.0.4

User registration bug fix

Aug 21, 2014

1.0.3

Fixed RainLab.User integration

Jul 28, 2014

1.0.2

Require RainLab.User

Jul 15, 2014

1.0.1

First version of SocialLogin

Jul 04, 2014

Upgrade guide

Upgrading to 1.0.16

Version 1.0.16 of the Social Login plugin is a significant rewrite with a few breaking changes. We've moved from a much older login provider library to Laravel Socialite. This should provide reliability improvements when logging in solving many of the issues users were experiencing.

Before Updating

  • In Admin go to Settings - Social Login and copy your login providers' settings. Some of these may need to be re-entered. You can just paste the same details back in again.

After Updating

  • Paste your copied login provider settings back in the Settings - Social Login area of admin if they've disappeared.
  • If you have any third party plugins extending Social Login by adding extra login providers, they may need to require in new dependencies if they were relying on the old packages Social Login used. Your developer will need to handle this one. If you only see Google, Facebook and Twitter in Settings - Social Login area of admin then you probably don't need to worry about this.

Other FAQ

  • No changes are needed on the frontend of your site.
  • Frontend users will not need to reassociate their social accounts with your site. Everything will keep working for them provided you follow the backend steps above.