oauth2

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New added in v1.4.0

func New(
	config *models.Config,
	logger models.Logger,
	userService models.UserService,
	accountService models.AccountService,
	sessionService models.SessionService,
	tokenService models.TokenService,
	oauth2ProviderRegistry *oauth2providers.OAuth2ProviderRegistry,
) *service

Types

type OAuth2UseCase added in v1.4.0

type OAuth2UseCase interface {
	// PrepareOAuth2Login generates the authorization URL and state for the OAuth2 login flow
	PrepareOAuth2Login(ctx context.Context, providerName string) (*models.OAuth2LoginResult, error)

	// SignInWithOAuth2 handles the OAuth2 callback, validates the state, exchanges the code for tokens,
	// and either creates a new user or updates an existing one's OAuth2 credentials
	SignInWithOAuth2(ctx context.Context, providerName string, code string, state string, verifier *string) (*models.SignInResult, error)
}

Jump to

Keyboard shortcuts

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