auth

package
v0.0.0-...-b6467df Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IAuth

type IAuth interface {
	SignUp(credentials interface{}) (*auth.Res, error)
	SignIn(credentials interface{}) (interface{}, error)
	RefreshUser(userToken string, refreshToken string) (*interface{}, error)
	ExchangeCode(opts interface{}) (*interface{}, error)
	SendMagicLink(email string) error
	SignInWithProvider(opts interface{}) (*interface{}, error)
	User(userToken string) (*User, error)
	UpdateUser(userToken string, updateData map[string]interface{}) (*User, error)
	ResetPasswordForEmail(email string) error
	SignOut(userToken string) error
	ConvertForDomain(v auth.User) (User, error)
}

func NewRepository

func NewRepository(c *http.Client) IAuth

type User

type User struct {
	ID                 string    `json:"id"`
	Aud                string    `json:"aud"`
	Role               string    `json:"role"`
	Email              string    `json:"email"`
	InvitedAt          time.Time `json:"invited_at"`
	ConfirmedAt        time.Time `json:"confirmed_at"`
	ConfirmationSentAt time.Time `json:"confirmation_sent_at"`
	AppMetadata        struct {
		// contains filtered or unexported fields
	} `json:"app_metadata"`
	UserMetadata map[string]interface{} `json:"user_metadata"`
	CreatedAt    time.Time              `json:"created_at"`
	UpdatedAt    time.Time              `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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