Enable Login with Google on your Frontend application using Google Oauth2 and SpringBoot by Implementing it end to end


What you will learn


You will learn about Oauth2 and Spring security

You will learn about creating REST endpoint using Springboot

You will learn about Google Oauth2 and Springboot integration

You will learn to create a frontend and connect it with Login with Google

Description


In this course you will learn to create a frontend application using HTML, CSS, JavaSCript and Bootstrap.


Then we will learn to create a Springboot application. After that, we will move on to create few REST API endpoints in our Springboot Application.


Next we will move on to configure google console dashbaord to register our Springboot application.


Then we will make a connection from our Springboot application with Google console.


After that we will configure Spring Security in our Springboot application in such a way that only allowed endpoints will not need authentication. But for other endpoints user will be redirected to Google Authentication page.


On Google Authentication page user will fill out its google credentials. If entered credentials are the correct user will be redricted to our Springboot Application.


Now its time for us to create our frontend application and we will connect this frontend with our Springboot application.


So user will now come to our Frontend, then he will login with google.


On successful login we will fetch user information from google and show it to user on the next page.


With Login with Google functionality we don’t have to keep a seperate user database with us rather we can ask google to authenticate our user on our application’s behalf. If successfully authenticated then google will give us all the profile information of the user.


Using this information we can do further operation in our application.


English

language

Content


Introduction & Installation Setup

Course Overview

Software Installation

Google Console Setup & Architecture

Overall Project Workflow and Architecture

Create Google Console Project & Update consent screen

Creating Client Id and Client Credentials

Working with SpringBoot & Security

Generating Springboot Project from Spring Initializer

Import project to intellij

Implementing Controller with Greeting Endpoint

Spring security configuration for clientId and clientSecret

Implementing Spring Security Config class

Test Log-in with Valid Google Account

Getting LoggedIn user profile information in our application

Developing Frontend & Integrating with Backend

Downloading Visual Studio Code

Setting up Frontend

Integrating Bootstrap5

Add Login with Google Link

Redirect User to Frontend Index page

Fetch API call to Get Current User Data

Solve the CORS issue

Understanding the complete google authentication flow

Designing Our Homepage for User Profile

End to End testing with multiple google user login

Enroll for Free

Post a Comment

Previous Post Next Post