🎯 Intro: A secrets project which will show you secrets after Authentication from your Google account.
🎖 Feature:
- You can sign in or log in( if already signed in ) by your google accout.
- You can add your secrets and make them private and can be only accessed after Authentication from google.
- Frontend: HTML, CSS, EmbeddedJs, JavaScript
- Backend: Node.js, Express.js, PostgreSQL
- Authentication: OAuth using Google
- Database: PostgreSQL
How Authentication with Google works in this project. This include:
- Registering your project with the Google Developers Console
- Setting up OAuth 2.0 credentials
- Integrating the Google Sign-In button into your application(which is included in code)
- Handling authentication tokens and user sessions
You can the get the step by step process of Setting up your Google OAuth Credentials here : https://developers.google.com/workspace/guides/create-credentials
-
Clone the repository:
git clone https://github.com/HarsikaKumari/secretsProject.git
-
Install the dependencies for the frontend:
cd secretsProject npm install
-
Set up the environment variables:
- Create a
.env
file in the directory. - Add the following variables to the
.env
file and provide appropriate values:GOOGLE_CLIENT_ID="Your google Client Id" GOOGLE_CLIENT_SECRET="Your google Client Secret" SESSION_SECRET="Any word as you want" PG_USER="postgres" PG_HOST="localhost" PG_DATABASE="Your database name" PG_PASSWORD="Your pg password" PG_PORT="5432"
- Create a
-
Access the application in your browser at
http://localhost:3000
.
Contributions are welcome! If you find any issues or have suggestions for improvements, please create a new issue or submit a pull request.