2017 © Pedro Peláez
 

library leds-oauth2

OAuth2 module using http://oauth2.thephpleague.com/ library and Doctine2 for database setup for login with a social account.

image

ledsinclouds/leds-oauth2

OAuth2 module using http://oauth2.thephpleague.com/ library and Doctine2 for database setup for login with a social account.

  • Tuesday, November 10, 2015
  • by ledsinclouds
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

ZF2 OAuth2 Connect Module

Introduction

This is a social login module using http://oauth2.thephpleague.com/ library and Doctine2 for database setup., (*1)

Installation

The recommended way to get a working copy of this project is to clone the repository and use composer to install dependencies:, (*2)

curl -s https://getcomposer.org/installer | php --

You would then invoke composer to install dependencies. Add to your composer.json, (*3)

"ledsinclouds/leds-oauth2": "dev-master"

Configuration

Once module installed, you could declare the module into your "config/application.config.php" by adding "LedsOAuth2"., (*4)

    'Application',
    'AkrabatSession',   
    'DoctrineModule',
    'DoctrineORMModule',
    'AssetManager',
    'LedsOAuth2',

Copy/Paste the configuration file and change configuration options according to your social accounts. Note: You must create applications for that..., (*5)

cp vendor/ledsinclouds/leds-oauth2/config/oaut.local.php.dist config/autoload/oauth.local.php

This module is shipped with 2 ViewHelpers - cssWidget(Account detal view when logged) & oauthWidget(Social Icons for login), (*6)

<?php echo cssWidget() ?>
<?php echo oauthWidget() ?>

Setup Session Handling

Create a directory "session" in data directory with read/write access to your web server, (*7)

$ mkdir www/{approot}/data/session 
$ chown -R apache:apache www/{approot}/data/session 
$ chmod -R 0770 apache:apache www/{approot}/data/session 

return array(
    'session' => array(
        'name' => 'auth',
        'save_path' => __DIR__ . '/../../../data/session'
    ),
);  

Database Setup

copy "doctrine.local.php.dist" to "config/autoload/doctrine.local.php", (*8)

./vendor/bin/doctrine-module orm:validate-schema
./vendor/bin/doctrine-module orm:schema-tool:update --force

The Versions

10/11 2015

dev-master

9999999-dev https://github.com/ledsinclouds/LedsOAuth2.git

OAuth2 module using http://oauth2.thephpleague.com/ library and Doctine2 for database setup for login with a social account.

  Sources   Download

BSD-3-Clause

The Requires

 

framework zf2 leds-oauth2