AvgBlank / URLShortener

URLShortener simplifies URL management with an intuitive interface and efficient backend. Built with Flask and MongoDB, it offers a seamless experience for shortening URLs.
https://trim.lol
10 stars 18 forks source link

Fix #11: Added Login with Google functionality that redirects to /stats page after Login #18

Closed biresh1929 closed 1 month ago

biresh1929 commented 1 month ago
  1. I connect to mongodb by connection url and paste it into .env file.
  2. I also generate a secret key and place it in .env file.
  3. Then I make an account on Google Developers Console where I set up OAuth consent screen and get Google client Id, secret and redirect url and place those on .env file.
  4. Then in app.py file, I fetch the variables from the .env file and set the routes - /login/google and /authorize/google.
  5. Then in index.html file, I create a "Login with Google" button.
  6. In stats.html file, I make the template say Hello userId.

trim-home stats-after-userId-login trim-email-login trim-signin-authorize stats-after-google-login