Skip to content

Latest commit

 

History

History
82 lines (47 loc) · 5.27 KB

File metadata and controls

82 lines (47 loc) · 5.27 KB

Learn Google Auth

  • Google Auth Library: npm: This is Google's officially supported node.js client library for using OAuth 2.0 authorization and authentication with Google APIs.
  • GoogleApis: npm: Click here
  • @react-oauth/google: npm, github (used in sahilrajput03/react-google-oauth)
  • react-google-login: npm, github (package is no longer maintained as mentioed on its github repo)

❤️ Login with google with svelte + expressjs (latest)

svelte-express-google-login

Login with google with svelte (backend + frontend)

Deployed at vercel.com and render.com (tested and working well on both platforms).

https://github.com/sahilrajput03/lucia-example-sveltekit-google-oauth

😇 Some links related to Google Login

Date: 11 Jan 2025 - Google Doc - Some Links for Login with google

Authorization issue - 13 Dec 2023

UPDATE: 13 Dec 2023 - This happens only when pushed to vercel site (subdomain) and I am hoping that the issue will be gone after the app is switched to "production" as suggested by an answerer in the above stackoverflow question.

  • Google query to explore more: Click here
  • Stackoverflow question from above google search: Click here

Implementing google signin (Totel Scam Project)

Quick Links:

On Oauth Consent Screen you need to fill it like this:

By default we get general details of the user who is logging-in in our app but we want more details from the user, we can get it by selecting some desired scopes from the list (point 2):

We don't want any test users so we can click save and continue:

In the end it shows the summary and you can simply click "BACK TO DASHBOARD" now:

Out consent screen is ready now we can create the OAuth credentials:

And finally you get the clientId and clientSecret like that:

NOTE: for nextjs's nextauth we change the redirect url like that, (Since I am running on port 3001, I need make the port as 3001)