2017 © Pedro Peláez
 

craft-plugin craft3-autologin

Automatically login based on whitelisted IP, basic auth username or URL keys

image

superbig/craft3-autologin

Automatically login based on whitelisted IP, basic auth username or URL keys

  • Wednesday, December 13, 2017
  • by superbig
  • Repository
  • 1 Watchers
  • 8 Stars
  • 135 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 2 Versions
  • 44 % Grown

The README.md

Autologin plugin for Craft CMS

Automatically login based on whitelisted IP, basic auth username or URL keys., (*1)

Installation

You can install Autologin via the plugin store, or through Composer., (*2)

Craft Plugin Store

To install Autologin, navigate to the Plugin Store section of your Craft control panel, search for Autologin, and click the Try button., (*3)

Composer

You can also add the package to your project using Composer., (*4)

  1. Open your terminal and go to your Craft project:, (*5)

    cd /path/to/project
  2. Then tell Composer to load the plugin:, (*6)

    composer require verbb/autologin
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Autologin., (*7)

Configuring Autologin

The plugin is configured in the config/ directory in a file you create called autologin.php. What follows is an example of what it might contain., (*8)

<?php
return [
    // Enable the Autologin plugin
    'enabled' => true,

    // A list of Craft usernames/emails mapped to IPs
    'ipWhitelist' => [
        'craftUsername' => [
            '162.247.141.58',
            '162.247.141.59',
        ],
    ],

    // A list of Craft usernames/emails mapped to basic auth usernames
    'basicAuth' => [
        'craftUserName1' => 'basicAuthUsername',
        'craftUserName2' => 'basicAuthUsername2',    
    ],

    // A list of Craft usernames/emails mapped to url keys
    'urlKeys' => [
        'craftUserName' => 'BepmD8GQBZpaFpXQ',
    ],

    // Redirect to this url after logging in automatically
    'redirectUrl' => '',
];

Login by URL

You can provide your users with a url that automatically logs them in. To set this up, you need a pair of username => password in the urlKeys setting., (*9)

After setting that up, you can login by going to siteurl.tld/autologin?key=BepmD8GQBZpaFpXQ., (*10)

If you want to redirect to the control panel dashboard, add cp=true to the url: siteurl.tld/autologin?key=BepmD8GQBZpaFpXQ&cp=true, (*11)

Credits

Originally created by the team at Superbig., (*12)

Show your Support

Autologin is licensed under the MIT license, meaning it will always be free and open source – we love free stuff! If you'd like to show your support to the plugin regardless, Sponsor development., (*13)

, (*14)

The Versions

13/12 2017

dev-master

9999999-dev

Automatically login based on whitelisted IP, basic auth username or URL keys

  Sources   Download

MIT

The Requires

 

cms craftcms craft-plugin craft autologin

03/11 2017

1.0.0

1.0.0.0

Automatically login based on whitelisted IP or a key

  Sources   Download

MIT

The Requires

 

cms craftcms craft-plugin craft autologin