provider_template

package
v0.0.0-...-1726717 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProvider

func NewProvider(
	config *config.Config,
	deps *Dependencies,
) (*provider, error)

NewProvider returns a new provider for your database type. TODO: change provider struct and NewProvider to use your database client.

This provider must implement all methods from storage.Provider, including: - User, VerificationRequest, Session, Webhook, EmailTemplate, OTP, Authenticator - Memory store methods (when Redis is not configured):

  • SessionToken: AddSessionToken, GetSessionTokenByUserIDAndKey, DeleteSessionToken, DeleteSessionTokenByUserIDAndKey, DeleteAllSessionTokensByUserID, DeleteSessionTokensByNamespace, CleanExpiredSessionTokens, GetAllSessionTokens
  • MFASession: AddMFASession, GetMFASessionByUserIDAndKey, DeleteMFASession, DeleteMFASessionByUserIDAndKey, GetAllMFASessionsByUserID, CleanExpiredMFASessions, GetAllMFASessions
  • OAuthState: AddOAuthState, GetOAuthStateByKey, DeleteOAuthStateByKey, GetAllOAuthStates

Use schemas.Collections for table/collection names (e.g., schemas.Collections.SessionToken).

Types

type Dependencies

type Dependencies struct {
	Log *zerolog.Logger
}

Dependencies struct the TODO(replace with new db name) data store provider

Jump to

Keyboard shortcuts

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