In the past week, we created a password manager where users can add and encrypt passwords, save them to the database, and decrypt them when needed.
Now, we will implement an authentication system to ensure that only authorized users can access their passwords, preventing other users from viewing them. We will also ensure that only logged-in users can save their passwords.
To simplify this process, we are using Google Cloud Platform to create an OAuth system and store user data in our MySQL database. In the database, there will be a new table called users that will relate to the passwords table. This relationship is essential to ensure that each password is securely associated with the correct user.
On the frontend, we will use the @react-oauth/google library, which will handle the interaction with Google API on the client side, manage the authentication state, and even display the login popup.
Demo : Instagram
Source Code : Github
Discover more from Coursity
Subscribe to get the latest posts sent to your email.