oauth

package
v0.0.0-...-506abc5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Get configuration
	ClientID     = utils.Getenv("OAUTH_GOOGLE_CLIENT_ID", "YOUR_CLIENT_ID")
	ClientSecret = utils.Getenv("OAUTH_GOOGLE_CLIENT_SECRET", "YOUR_CLIENT_SECRET")
	RedirectURL  = utils.Getenv("OAUTH_REDIRECT_URL", "http://localhost:3000/auth/callback/:type")
)

Functions

func Routes

func Routes() chi.Router

Routes creates a REST router

Types

type Callback

type Callback struct {
	Code string `json:"code"`
}

type UserGoogle

type UserGoogle struct {
	Email         string `json:"email"`
	FamilyName    string `json:"family_name"`
	Gender        string `json:"gender"`
	GivenName     string `json:"given_name"`
	Id            string `json:"id"`
	Link          string `json:"link"`
	Locale        string `json:"locale"`
	Name          string `json:"name"`
	Picture       string `json:"picture"`
	VerifiedEmail bool   `json:"veriefied_email"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL