pkg

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidAuthorizationCode = fmt.Errorf("invalid authorization code")
	ErrInvalidIDToken           = fmt.Errorf("invalid ID token")
)

Functions

This section is empty.

Types

type GoogleSignin

type GoogleSignin struct {
	// contains filtered or unexported fields
}

func NewGoogleSignin

func NewGoogleSignin(
	clientID string,
	clientSecret string,
	redirectURL string,
	scopes []string,
) *GoogleSignin

func (*GoogleSignin) Exchange

func (g *GoogleSignin) Exchange(ctx context.Context, code string) (*GoogleUser, error)

func (*GoogleSignin) GetAuthURL

func (g *GoogleSignin) GetAuthURL(state string) string

func (*GoogleSignin) VerifyGoogleIDToken

func (g *GoogleSignin) VerifyGoogleIDToken(
	ctx context.Context,
	tokenString string,
) (*GoogleUser, error)

type GoogleUser

type GoogleUser struct {
	ID         string `json:"id"`
	Email      string `json:"email"`
	Verified   bool   `json:"verified_email"`
	Name       string `json:"name"`
	GivenName  string `json:"given_name"`
	FamilyName string `json:"family_name"`
	Picture    string `json:"picture"`
	Locale     string `json:"locale"`
}

Jump to

Keyboard shortcuts

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