Code Monkey home page Code Monkey logo

symfony-fosuserbundle-hwioauthbundle's Introduction

Facebook / Google login in Symfony with HWIOAuthBundle and FOSUserBundle

What's inside?

Base symfony 2.8.* setup with HWIOAuthBundle and FOSUserBundle configured.

Instructions

Facebook configuration

Base configuration

  • Clone the repo.
  • Do comsposer install.
  • Enter facebook appId and appSecret during parameters setup.
  • (Optional) Edit the User entity to your likings in src/AppBundle/Entity/User.php.
  • Update your database schema. php app/console doctrine:schema:update --force

How to use it

Paths

Base

  • /login - User login.
  • /logout - User login.
  • /register - New user registration.
  • /resetting/request - Password recovery.
  • /profile - User's profile page.
  • /profile/edit - User's change info page.

Providers

  • /login/ - Links to available auth methods. ( Note the slash after login ).
  • /login/{provider} - Direct auth link to specific provider, (/login/facebook).

Console

You can also create / activate / deactivate / delete / promote / demote / edit, users via the command line.

  • php app/console fos:user:create newuser
  • php app/console fos:user:promote newuser ROLE_ADMIN

How it works

  • If the user is not registered on the website, he can use the provider ( facebook / google ) links to register on the website. After a successful login, the user is automatically registered and logged in.
  • If the user is already registered via the base registration link, he can link his account with his provider's account ( facebook / google ). He can do that by logging in via the base login link and the visiting /login/{provider} (/login/facebook). The provider's ID will be assigned to the Users account and the user now can login with his credentials or his assigned provider accounts.

========================

symfony-fosuserbundle-hwioauthbundle's People

Contributors

ernestre 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.