google

package
v1.2.12 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Store *session.Store
)

Functions

func AuthBuilder

func AuthBuilder(authHandler func(c *fiber.Ctx) error) func(c *fiber.Ctx) error

func GetGoogleOauthURL

func GetGoogleOauthURL() string

func GoogleCallbackBuilder

func GoogleCallbackBuilder(callbackHandler func(c *fiber.Ctx) error) func(c *fiber.Ctx) error

func HandleGoogleCallback

func HandleGoogleCallback(c *fiber.Ctx) error

func HandleGoogleLogin

func HandleGoogleLogin(c *fiber.Ctx) error

func InitializeStore

func InitializeStore(cookieExp time.Duration, cookieDomain string, cookieSecure bool, oauthState string)

func IsGoogleAuthenticated

func IsGoogleAuthenticated(c *fiber.Ctx) bool

func RequireGoogleAuth

func RequireGoogleAuth(c *fiber.Ctx) error

Types

type ResponseHTTP

type ResponseHTTP struct {
	Success bool        `json:"success"`
	Data    interface{} `json:"data"`
	Message string      `json:"message"`
}

type UserInfo

type UserInfo struct {
	Email         string `json:"email"`
	Name          string `json:"name"`
	Picture       string `json:"picture"`
	VerifiedEmail bool   `json:"verified_email"`
	ID            string `json:"id"`
}

Jump to

Keyboard shortcuts

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