Skip to content

Project showcasing a flexible authentication system with Email/Password, Google and Facebook login options.

Notifications You must be signed in to change notification settings

LuigiG34/MultiAuthDemo

Repository files navigation

MultiAuthDemo

Project showcasing a flexible authentication system with Email/Password, Google and Facebook login options.


1) Requirements

  1. Docker
  2. Docker Compose
  3. (Windows) WSL2
  4. Google Cloud Console Account
  5. Facebook Developer Account

2) Install

git clone https://github.com/LuigiG34/MultiAuthDemo
cd MultiAuthDemo

docker compose up -d --build

docker compose exec php composer install

docker compose exec app php bin/console doctrine:database:create

docker compose exec app php bin/console make:migration

docker compose exec app php bin/console doctrine:migrations:migrate

3) Google OAuth configuration

Create a new web Client to retrieve the CLIENT_ID, APP_SECRET & AUTH_CONFIG https://console.cloud.google.com/

Add to .env

GOOGLE_CLIENT_ID=yourclientid
GOOGLE_CLIENT_SECRET=yourclientsecret
GOOGLE_AUTH_CONFIG=C:/path/to/apps.googleusercontent.com.json

Create a test user in you Google cloud console (in https://console.cloud.google.com/auth/audience?project=...)


4) Facebook configuration

Create a new web app to retrieve the CLIENT_ID & APP_SECRET go to https://developers.facebook.com/

Add to .env

FACEBOOK_APP_ID=your_facebook_app_id
FACEBOOK_APP_SECRET=your_facebook_app_secret

5) Test the login/register

Go to localhost:8000/login or localhost:8000/register


6) Create test DB & Run tests

docker compose exec app php bin/console doctrine:database:create --env=test
docker compose exec app vendor/bin/phpunit --testdox

About

Project showcasing a flexible authentication system with Email/Password, Google and Facebook login options.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published