Coder Social home page Coder Social logo

bleutecmedia / ci3_google_auth Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.58 MB

CodeIgniter 3.x app para ayudar al usuario a iniciar sesión con su cuenta de Google.

Home Page: https://bleutecmedia.com/

License: MIT License

PHP 99.61% HTML 0.32% CSS 0.08%
codeigniter3 oauth2 google ejemplo libreria

ci3_google_auth's Introduction

ci3_google_auth

Ejemplo para integrar Login con Google en una Aplicación CodeIgniter 3.x

Instalación

  • 1.- Clone el proyecto en el Path de su Servidor Web

git clone [email protected]:Bleutecmedia/ci3_google_auth.git

  • 2.- Dentro de ci3_google_auth instale google/apiclient vía composer:

composer require google/apiclient:"^2.7"

  • 3.- Puede tener configurado en application/config/config.php la carga automática de Composer con:

$config['composer_autoload'] = TRUE;

  • 4.- Crear las credenciales en nuetro Proyecto en la Consola Google para la Autenticación Ir a https://console.developers.google.com/ Seguir las instrucciones de las capturas de la carpeta images.

Agregar en application/config/app.php el ID del Cliente y la Clave secreta obtenidas. El siguiente es un ejemplo

$config['google']['client_id']        = 'asdasdasd.apps.googleusercontent.com';
$config['google']['client_secret']    = 'asdasd2wd';
$config['google']['redirect_uri']     = 'http://ci3-google-auth.net/ci3_google_auth/login/ingreso';
$config['google']['application_name'] = 'ci3_google_auth';
$config['google']['api_key']          = '';
$config['google']['scopes']           = array('email','profile');
  • 7.- Si está usando servidor local, para el caso de Windows agregar en C:\Windows\System32\drivers\etc\hosts 127.0.0.1 http://ci3-google-auth.net para poder probar el login, ya que la Aplicación de Google no permite agregar URL locales para probar el Auth.

  • 6.- Probar y adecuar a cualquier proyecto.

ci3_google_auth's People

Contributors

iscalej avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.