Google OAuth, PHP-Symfony, API-Platform, JWT

Google OAuth, PHP-Symfony, API-Platform, JWT

Symfony application using Google OAuth for authentication. When a user signs in through Google, our system will check if the user already exists in our database. If not, it will create a new user account. Once authenticated, either as a new or existing user, our application will generate a JSON Web Token (JWT). Built on the API Platform.

I have explained below which commands we need. If you want a detailed explanation, please purchase my Udemy course.

Creating Symfony Applications

symfony new my_project_directory

The Symfony MakerBundle

composer require --dev symfony/maker-bundle

API Platform

composer require api


composer require doctrine/annotations


composer require "lexik/jwt-authentication-bundle"

Google Provider for OAuth 2.0 Client

composer require league/oauth2-google