Versions in this module Expand all Collapse all v1 v1.4.0 Aug 15, 2026 v1.3.0 Jul 22, 2026 v1.2.0 Jun 28, 2026 v1.1.2 Jun 28, 2026 Changes in this version + const DefaultAppleIssuer + const IssuerAzureCommon + const IssuerAzureMicrosoft + const IssuerAzureOrganizations + const IssuerFacebook + const IssuerGoogle + const IssuerKakao + const IssuerLinkedin + const IssuerSnapchat + const IssuerVercelMarketplace + const OtherAppleIssuer + const UserInfoEndpointGoogle + var OverrideClock func() time.Time + var OverrideVerifiers = make(map[string]func(context.Context, *oidc.Config) *oidc.IDTokenVerifier) + func DetectAppleIDTokenIssuer(ctx context.Context, idToken string) (string, error) + func DetectAzureIDTokenIssuer(ctx context.Context, idToken string) (string, error) + func GetName(name linkedinName) string + func IsAppleIssuer(issuer string) bool + func IsAzureCIAMIssuer(issuer string) bool + func IsAzureIssuer(issuer string) bool + func OverrideGoogleProvider(issuer, userInfo string) + func ResetGoogleProvider() + type AppleIDTokenClaims struct + AuthTime *float64 + Email string + IsPrivateEmail *IsPrivateEmail + TransferSub string + type AppleProvider struct + func (p AppleProvider) AuthCodeURL(state string, args ...oauth2.AuthCodeOption) string + func (p AppleProvider) GetOAuthToken(ctx context.Context, code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error) + func (p AppleProvider) GetUserData(ctx context.Context, tok *oauth2.Token) (*UserProvidedData, error) + func (p AppleProvider) ParseUser(data string, userData *UserProvidedData) error + func (p AppleProvider) RequiresPKCE() bool + type AzureIDTokenClaims struct + Email string + Name string + PreferredUsername string + XMicrosoftEmailDomainOwnerVerified any + func (c *AzureIDTokenClaims) IsEmailVerified() bool + type Claims struct + Aud audience + AvatarURL string + Birthdate string + CustomClaims map[string]interface{} + Email string + EmailVerified bool + Exp float64 + FamilyName string + FullName string + Gender string + GivenName string + Iat float64 + Issuer string + Locale string + MiddleName string + Name string + NickName string + Phone string + PhoneVerified bool + Picture string + PreferredUsername string + Profile string + ProviderId string + Slug string + Subject string + UpdatedAt *UnixTimeOrString + UserNameKey string + Website string + ZoneInfo string + type CustomOAuthProvider struct + func NewCustomOAuthProvider(...) *CustomOAuthProvider + func (p *CustomOAuthProvider) AuthCodeURL(state string, opts ...oauth2.AuthCodeOption) string + func (p *CustomOAuthProvider) GetOAuthToken(ctx context.Context, code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error) + func (p *CustomOAuthProvider) GetUserData(ctx context.Context, tok *oauth2.Token) (*UserProvidedData, error) + func (p *CustomOAuthProvider) RequiresPKCE() bool + type CustomOIDCProvider struct + func NewCustomOIDCProvider(ctx context.Context, clientID, clientSecret, redirectURL string, ...) (*CustomOIDCProvider, error) + func (p *CustomOIDCProvider) AuthCodeURL(state string, opts ...oauth2.AuthCodeOption) string + func (p *CustomOIDCProvider) Config() *oauth2.Config + func (p *CustomOIDCProvider) GetOAuthToken(ctx context.Context, code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error) + func (p *CustomOIDCProvider) GetUserData(ctx context.Context, tok *oauth2.Token) (*UserProvidedData, error) + func (p *CustomOIDCProvider) RequiresPKCE() bool + type Email struct + Email string + Primary bool + Verified bool + type FacebookIDTokenClaims struct + Email string + Name string + Nonce string + Picture string + type HTTPError struct + Code int + ErrorID string + InternalError error + InternalMessage string + Message string + func (e *HTTPError) Cause() error + func (e *HTTPError) Error() string + func (e *HTTPError) Is(target error) bool + func (e *HTTPError) WithInternalError(err error) *HTTPError + func (e *HTTPError) WithInternalMessage(fmtString string, args ...interface{}) *HTTPError + type IsPrivateEmail bool + func (b *IsPrivateEmail) UnmarshalJSON(data []byte) error + type KakaoIDTokenClaims struct + Email string + Nickname string + Picture string + type LinkedinIDTokenClaims struct + Email string + EmailVerified string + FamilyName string + GivenName string + Locale string + Picture string + type OAuthProvider interface + AuthCodeURL func(string, ...oauth2.AuthCodeOption) string + GetOAuthToken func(ctx context.Context, code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error) + GetUserData func(context.Context, *oauth2.Token) (*UserProvidedData, error) + RequiresPKCE func() bool + func NewAppleProvider(ctx context.Context, ext conf.OAuthProviderConfiguration, ...) (OAuthProvider, error) + func NewAzureProvider(ext conf.OAuthProviderConfiguration, scopes string, cache *OIDCProviderCache) (OAuthProvider, error) + func NewBitbucketProvider(ext conf.OAuthProviderConfiguration) (OAuthProvider, error) + func NewDiscordProvider(ext conf.OAuthProviderConfiguration, scopes string) (OAuthProvider, error) + func NewFacebookProvider(ext conf.OAuthProviderConfiguration, scopes string) (OAuthProvider, error) + func NewFigmaProvider(ext conf.OAuthProviderConfiguration, scopes string) (OAuthProvider, error) + func NewFlyProvider(ext conf.OAuthProviderConfiguration, scopes string) (OAuthProvider, error) + func NewGithubProvider(ext conf.OAuthProviderConfiguration, scopes string) (OAuthProvider, error) + func NewGitlabProvider(ext conf.OAuthProviderConfiguration, scopes string) (OAuthProvider, error) + func NewGoogleProvider(ctx context.Context, ext conf.OAuthProviderConfiguration, scopes string, ...) (OAuthProvider, error) + func NewKakaoProvider(ext conf.OAuthProviderConfiguration, scopes string) (OAuthProvider, error) + func NewKeycloakProvider(ext conf.OAuthProviderConfiguration, scopes string) (OAuthProvider, error) + func NewLinkedinOIDCProvider(ctx context.Context, ext conf.OAuthProviderConfiguration, scopes string, ...) (OAuthProvider, error) + func NewLinkedinProvider(ext conf.OAuthProviderConfiguration, scopes string) (OAuthProvider, error) + func NewNotionProvider(ext conf.OAuthProviderConfiguration) (OAuthProvider, error) + func NewSlackOIDCProvider(ext conf.OAuthProviderConfiguration, scopes string) (OAuthProvider, error) + func NewSlackProvider(ext conf.OAuthProviderConfiguration, scopes string) (OAuthProvider, error) + func NewSnapchatProvider(ext conf.OAuthProviderConfiguration, scopes string) (OAuthProvider, error) + func NewSpotifyProvider(ext conf.OAuthProviderConfiguration, scopes string) (OAuthProvider, error) + func NewTwitchProvider(ext conf.OAuthProviderConfiguration, scopes string) (OAuthProvider, error) + func NewTwitterProvider(ext conf.OAuthProviderConfiguration, scopes string) (OAuthProvider, error) + func NewVercelMarketplaceProvider(ctx context.Context, ext conf.OAuthProviderConfiguration, scopes string, ...) (OAuthProvider, error) + func NewWorkOSProvider(ext conf.OAuthProviderConfiguration) (OAuthProvider, error) + func NewXProvider(ext conf.OAuthProviderConfiguration, scopes string) (OAuthProvider, error) + func NewZoomProvider(ext conf.OAuthProviderConfiguration) (OAuthProvider, error) + type OIDCProviderCache struct + func NewOIDCProviderCache(ttl time.Duration) *OIDCProviderCache + func (c *OIDCProviderCache) Clear() + func (c *OIDCProviderCache) GetProvider(ctx context.Context, issuer string) (*oidc.Provider, error) + func (c *OIDCProviderCache) Invalidate(issuer string) + type ParseIDTokenOptions struct + AccessToken string + SkipAccessTokenCheck bool + type Provider interface + AuthCodeURL func(string, ...oauth2.AuthCodeOption) string + type TwitterProvider struct + AuthURL string + CallbackURL string + ClientKey string + Consumer *oauth.Consumer + OauthVerifier string + RequestToken *oauth.RequestToken + Secret string + UserInfoURL string + func (t *TwitterProvider) AuthCodeURL(state string, args ...oauth2.AuthCodeOption) string + func (t TwitterProvider) FetchUserData(ctx context.Context, tok *oauth.AccessToken) (*UserProvidedData, error) + func (t TwitterProvider) GetOAuthToken(_ context.Context, _ string, _ ...oauth2.AuthCodeOption) (*oauth2.Token, error) + func (t TwitterProvider) GetUserData(ctx context.Context, tok *oauth2.Token) (*UserProvidedData, error) + func (t TwitterProvider) Marshal() string + func (t TwitterProvider) RequiresPKCE() bool + func (t TwitterProvider) Unmarshal(data string) (*oauth.RequestToken, error) + type UnixTimeOrString time.Time + func (t *UnixTimeOrString) UnmarshalJSON(b []byte) error + func (t UnixTimeOrString) MarshalJSON() ([]byte, error) + type UserProvidedData struct + Emails []Email + Metadata *Claims + func ParseIDToken(ctx context.Context, provider *oidc.Provider, config *oidc.Config, ...) (*oidc.IDToken, *UserProvidedData, error) + type VercelMarketplaceIDTokenClaims struct + GlobalUserID string + UserAvatarUrl string + UserEmail string + UserName string