validation

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FirebaseApp

type FirebaseApp struct {
	App *firebase.App
}

func NewFirebaseApp

func NewFirebaseApp() (*FirebaseApp, error)

initialize app with ServiceAccountKey.json

func (*FirebaseApp) GetEmail

func (app *FirebaseApp) GetEmail(userId string) (string, error)

func (*FirebaseApp) Verify

func (app *FirebaseApp) Verify(ctx context.Context, idToken string) (userId string, email string, emailVerified bool, err error)

func (*FirebaseApp) VerifyIDToken

func (app *FirebaseApp) VerifyIDToken(ctx *gin.Context) (string, error)

type IFirebaseApp

type IFirebaseApp interface {
	VerifyIDToken(*gin.Context) (string, error)
	Verify(context.Context, string) (string, string, bool, error)
	GetEmail(string) (string, error)
}

Jump to

Keyboard shortcuts

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