Versions in this module Expand all Collapse all v1 v1.1.0 Jun 26, 2026 v1.0.0 Apr 29, 2026 Changes in this version + type API struct + func NewAPI(log *zap.Logger, googleIDTokenClient GoogleIDTokenClient, ...) (*API, error) + func (a *API) DeleteAccountHandler(c fiber.Ctx) error + func (a *API) GitHubOAuthHandler(c fiber.Ctx) error + func (a *API) GoogleOAuthHandler(c fiber.Ctx) error + func (a *API) LogoutHandler(c fiber.Ctx) error + func (a *API) RefreshTokenHandler(c fiber.Ctx) error + func (a *API) ResendVerificationEmailHandler(c fiber.Ctx) error + func (a *API) SignInHandler(c fiber.Ctx) error + func (a *API) SignUpHandler(c fiber.Ctx) error + func (a *API) UpdateProfileHandler(c fiber.Ctx) error + func (a *API) VerifyEmailHandler(c fiber.Ctx) error + type APICfg struct + ContactEmail string + RefreshTokenCookieSameSite string + RefreshTokenCookieSecure bool + type GitHubOAuthClient interface + ExchangeCodeForUser func(ctx context.Context, code string) (githubapi.UserInfo, error) + type GitHubOAuthRequest struct + Code string + type GoogleIDTokenClient interface + ValidateIDToken func(ctx context.Context, idToken string) (*idtoken.Payload, error) + type GoogleOAuthRequest struct + IDToken string + type SignInReq struct + Password string + Username string + type SignUpReq struct + ConfirmPassword string + DisplayName string + Email string + IsPublisher bool + Password string + Username string + type TokenResp struct + AccessToken string + type UpdateProfileReq struct + ConfirmNewPassword *string + Name *string + NewPassword *string + Password *string + type UserFacade interface + CreateTokens func(ctx context.Context, user model.User) (facade.TokenPair, error) + DeleteUser func(ctx context.Context, userID string) error + GetClaimsFromAccessToken func(tokenStr string) (auth.Claims, error) + GitHubOAuth func(ctx context.Context, oauthID, email, username string, emailVerified bool) (model.User, error) + GoogleOAuth func(ctx context.Context, oauthID, email string, emailVerified bool) (model.User, error) + RefreshTokens func(ctx context.Context, refreshTokenStr string) (facade.TokenPair, error) + ResendVerificationEmail func(ctx context.Context, userID string) error + RevokeRefreshToken func(ctx context.Context, refreshTokenStr string) error + SignIn func(ctx context.Context, username, password string) (model.User, error) + SignUp func(ctx context.Context, username, displayName, email, password string, ...) (model.User, error) + UpdateUserProfile func(ctx context.Context, userID string, params model.UpdateProfileParams) (model.User, error) + ValidateAccessToken func(tokenStr string) bool + VerifyEmail func(ctx context.Context, userID string, code string) (model.User, error) + type VerifyEmailReq struct + Code string + type VerifyTokenReq struct + Token string + type VerifyTokenResp struct + Valid bool