Versions in this module Expand all Collapse all v1 v1.0.0 Mar 21, 2026 Changes in this version + type AccountService interface + Create func(ctx context.Context, userID string, accountID string, providerID string, ...) (*models.Account, error) + CreateOAuth2 func(ctx context.Context, userID string, providerAccountID string, provider string, ...) (*models.Account, error) + GetByProviderAndAccountID func(ctx context.Context, provider string, accountID string) (*models.Account, error) + GetByUserID func(ctx context.Context, userID string) (*models.Account, error) + GetByUserIDAndProvider func(ctx context.Context, userID string, provider string) (*models.Account, error) + Update func(ctx context.Context, account *models.Account) (*models.Account, error) + UpdateFields func(ctx context.Context, userID string, fields map[string]any) error + type ConfigManagerService interface + GetAuthSettings func(ctx context.Context) (map[string]any, error) + GetConfig func(ctx context.Context) (*models.Config, error) + GetPluginConfig func(ctx context.Context, pluginName string) (any, error) + NotifyWatchers func(config *models.Config) error + RegisterConfigWatcher func(pluginID string, plugin models.PluginWithConfigWatcher) error + type CoreServices struct + AccountService AccountService + PasswordService PasswordService + SessionService SessionService + TokenService TokenService + UserService UserService + VerificationService VerificationService + type JWTService interface + ValidateToken func(token string) (userID string, err error) + type MailerService interface + SendEmail func(ctx context.Context, to string, subject string, text string, html string) error + type PasswordService interface + Hash func(password string) (string, error) + Verify func(password, encoded string) bool + type SecondaryStorageService interface + GetProviderName func() string + GetStorage func() models.SecondaryStorage + type SessionService interface + Create func(ctx context.Context, userID string, hashedToken string, ipAddress *string, ...) (*models.Session, error) + Delete func(ctx context.Context, ID string) error + DeleteAllByUserID func(ctx context.Context, userID string) error + DeleteAllExpired func(ctx context.Context) error + DeleteOldestByUserID func(ctx context.Context, userID string, maxCount int) error + GetByID func(ctx context.Context, id string) (*models.Session, error) + GetByToken func(ctx context.Context, hashedToken string) (*models.Session, error) + GetByUserID func(ctx context.Context, userID string) (*models.Session, error) + GetDistinctUserIDs func(ctx context.Context) ([]string, error) + Update func(ctx context.Context, session *models.Session) (*models.Session, error) + type TokenService interface + Decrypt func(encrypted string) (string, error) + Encrypt func(token string) (string, error) + Generate func() (string, error) + Hash func(token string) string + type UserService interface + Create func(ctx context.Context, name string, email string, emailVerified bool, ...) (*models.User, error) + Delete func(ctx context.Context, id string) error + GetAll func(ctx context.Context, cursor *string, limit int) ([]models.User, *string, error) + GetByEmail func(ctx context.Context, email string) (*models.User, error) + GetByID func(ctx context.Context, id string) (*models.User, error) + Update func(ctx context.Context, user *models.User) (*models.User, error) + UpdateFields func(ctx context.Context, id string, fields map[string]any) error + type VerificationService interface + Create func(ctx context.Context, userID string, hashedToken string, ...) (*models.Verification, error) + Delete func(ctx context.Context, id string) error + DeleteByUserIDAndType func(ctx context.Context, userID string, vType models.VerificationType) error + DeleteExpired func(ctx context.Context) error + GetByToken func(ctx context.Context, hashedToken string) (*models.Verification, error) + IsExpired func(verif *models.Verification) bool