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)
}
Click to show internal directories.
Click to hide internal directories.