user

package
v0.0.0-...-e6b71c9 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUser

func CreateUser(email string, password string, name string, deviceName string, clientID uuid.UUID) (user *models.User, err error)

CreateUser creates a user account with details provided

func DeleteAccount

func DeleteAccount(user models.User) (deletedUser models.User, err error)

DeleteAccount deletes a user account

This is a permanent delete, not a soft delete. The User model has a BeforeDelete hook to remove/clean associated data

func ResetPassword

func ResetPassword(password string, token string) (resetUser *models.User, err error)

ResetPassword changes the password for a user after verifying the token

The token here is a reset password token sent to a user when they request a password change as part of the forgot password flow

func SendForgotPasswordEmail

func SendForgotPasswordEmail(email string) (resetUser *models.User, err error)

SendForgotPasswordEmail sends an email with a unique reset password link to an email address associated to a user

func VerifyPasswordResetToken

func VerifyPasswordResetToken(token interface{}) (tokenUser *models.User, err error)

VerifyPasswordResetToken retrieves a user associated with a password reset token

Types

This section is empty.

Jump to

Keyboard shortcuts

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