Skip to content

MaloPolese/nestjs-oauth2-google-example

Repository files navigation

Description

Example of the implementation of google oauth2 with NestJs

Installation

$ npm ci

Complete the .env file

# Example: 1234.apps.googleusercontent.com
AUTH_GOOGLE_KEY= ...

# Example: 1234
AUTH_GOOGLE_SECRET= ...

# Example: http://localhost:3000/oauth2/callback
GOOGLE_CALLBACK_URL= ...

# Example: http://localhost:4200
FRONTEND_URL= ...

Obtain OAuth 2.0 credentials

Running the app

# watch mode
$ npm run start:dev

Usage

$ curl --location --request GET 'localhost:3000/oauth2/login/google'

About me

About

Example of the implementation of google oauth2 with NestJs

Topics

Resources

Stars

Watchers

Forks