Posts

Showing posts from December, 2022

Implementing google 2-FA authenticator in Spring Boot

Image
                                   Welcome geeks to my brand new blog. Today we are going to perform a basic POC, in which we will set up a basic google 2FA authentication in spring boot.      Before actually jumping into implementation let's try to understand what is 2FA and why we need this. So Basically 2FA stands for Two Factor Authentication. It's a randomly generated time-based password for accessing web apps. ''2FA, or two-factor authentication, is an identity verification method that requires a user to provide a second authentication factor in addition to a password or two authentication factors instead of a password in order to access a website, application or network.'' See the below diagram for a better understanding of how it works behind the scene.           There are multiple vendors in the market who provides such services as Google, and Microsoft. To be precise we are using google base 2-FA implementation today.                           To lever

Git 403: unable to access 'https://github.com/username/location.git/': The requested URL returned error: 403

Image
 Hi Geeks,        Hope you are doing well. Recently I was working on one of my projects and I came across a situation, where I'm getting 403 authentication-related errors while pushing my code to one of my public repositories.         Here are some pointers I would like to highlight the repo is public, so everyone can access it. But still, it is throwing 403 unauthorized exceptions while pushing code to the remote repo. Below is the step to simulate the above scenario. Step 1: Created an empty repo on a remote git hub account. Step 2: Initialise an empty repo locally or clone the above repo on the local machine. Step 3: Add the above repo as the remote origin to the local git Step 4: Added local changes to the stage area and try to make a push to the remote repo. As you can see in step 4 we are getting 403 permission-denied errors. The solution to the above issue. Step 1: Create Personal Access Token on GitHub  Log in to your GitHub account Click on the Profile logo in the top rig