Versions in this module Expand all Collapse all v3 v3.15.0 Oct 14, 2021 Changes in this version + func IsCertificateFetchFailed(err error) bool + func IsConfigurationNotFound(err error) bool + func IsEmailAlreadyExists(err error) bool + func IsEmailNotFound(err error) bool + func IsIDTokenExpired(err error) bool + func IsIDTokenInvalid(err error) bool + func IsIDTokenRevoked(err error) bool + func IsInsufficientPermission(err error) bool + func IsInvalidDynamicLinkDomain(err error) bool + func IsInvalidEmail(err error) bool + func IsPhoneNumberAlreadyExists(err error) bool + func IsProjectNotFound(err error) bool + func IsSessionCookieExpired(err error) bool + func IsSessionCookieInvalid(err error) bool + func IsSessionCookieRevoked(err error) bool + func IsTenantIDMismatch(err error) bool + func IsTenantNotFound(err error) bool + func IsUIDAlreadyExists(err error) bool + func IsUnauthorizedContinueURI(err error) bool + func IsUnknown(err error) bool + func IsUserNotFound(err error) bool + type ActionCodeSettings struct + AndroidInstallApp bool + AndroidMinimumVersion string + AndroidPackageName string + DynamicLinkDomain string + HandleCodeInApp bool + IOSBundleID string + URL string + type Client struct + TenantManager *TenantManager + func NewClient(ctx context.Context, conf *internal.AuthConfig) (*Client, error) + func (c *Client) SessionCookie(ctx context.Context, idToken string, expiresIn time.Duration) (string, error) + func (c *Client) VerifySessionCookie(ctx context.Context, sessionCookie string) (*Token, error) + func (c *Client) VerifySessionCookieAndCheckRevoked(ctx context.Context, sessionCookie string) (*Token, error) + func (c Client) CreateOIDCProviderConfig(ctx context.Context, config *OIDCProviderConfigToCreate) (*OIDCProviderConfig, error) + func (c Client) CreateSAMLProviderConfig(ctx context.Context, config *SAMLProviderConfigToCreate) (*SAMLProviderConfig, error) + func (c Client) CreateUser(ctx context.Context, user *UserToCreate) (*UserRecord, error) + func (c Client) CustomToken(ctx context.Context, uid string) (string, error) + func (c Client) CustomTokenWithClaims(ctx context.Context, uid string, devClaims map[string]interface{}) (string, error) + func (c Client) DeleteOIDCProviderConfig(ctx context.Context, id string) error + func (c Client) DeleteSAMLProviderConfig(ctx context.Context, id string) error + func (c Client) DeleteUser(ctx context.Context, uid string) error + func (c Client) DeleteUsers(ctx context.Context, uids []string) (*DeleteUsersResult, error) + func (c Client) EmailSignInLink(ctx context.Context, email string, settings *ActionCodeSettings) (string, error) + func (c Client) EmailVerificationLink(ctx context.Context, email string) (string, error) + func (c Client) EmailVerificationLinkWithSettings(ctx context.Context, email string, settings *ActionCodeSettings) (string, error) + func (c Client) GetUser(ctx context.Context, uid string) (*UserRecord, error) + func (c Client) GetUserByEmail(ctx context.Context, email string) (*UserRecord, error) + func (c Client) GetUserByPhoneNumber(ctx context.Context, phone string) (*UserRecord, error) + func (c Client) GetUserByProviderID(ctx context.Context, providerID string, providerUID string) (*UserRecord, error) + func (c Client) GetUserByProviderUID(ctx context.Context, providerID string, providerUID string) (*UserRecord, error) + func (c Client) GetUsers(ctx context.Context, identifiers []UserIdentifier) (*GetUsersResult, error) + func (c Client) ImportUsers(ctx context.Context, users []*UserToImport, opts ...UserImportOption) (*UserImportResult, error) + func (c Client) OIDCProviderConfig(ctx context.Context, id string) (*OIDCProviderConfig, error) + func (c Client) OIDCProviderConfigs(ctx context.Context, nextPageToken string) *OIDCProviderConfigIterator + func (c Client) PasswordResetLink(ctx context.Context, email string) (string, error) + func (c Client) PasswordResetLinkWithSettings(ctx context.Context, email string, settings *ActionCodeSettings) (string, error) + func (c Client) RevokeRefreshTokens(ctx context.Context, uid string) error + func (c Client) SAMLProviderConfig(ctx context.Context, id string) (*SAMLProviderConfig, error) + func (c Client) SAMLProviderConfigs(ctx context.Context, nextPageToken string) *SAMLProviderConfigIterator + func (c Client) SetCustomUserClaims(ctx context.Context, uid string, customClaims map[string]interface{}) error + func (c Client) UpdateOIDCProviderConfig(ctx context.Context, id string, config *OIDCProviderConfigToUpdate) (*OIDCProviderConfig, error) + func (c Client) UpdateSAMLProviderConfig(ctx context.Context, id string, config *SAMLProviderConfigToUpdate) (*SAMLProviderConfig, error) + func (c Client) UpdateUser(ctx context.Context, uid string, user *UserToUpdate) (ur *UserRecord, err error) + func (c Client) Users(ctx context.Context, nextPageToken string) *UserIterator + func (c Client) VerifyIDToken(ctx context.Context, idToken string) (*Token, error) + func (c Client) VerifyIDTokenAndCheckRevoked(ctx context.Context, idToken string) (*Token, error) + type DeleteUsersErrorInfo struct + Index int + Reason string + type DeleteUsersResult struct + Errors []*DeleteUsersErrorInfo + FailureCount int + SuccessCount int + type EmailIdentifier struct + Email string + type ErrorInfo struct + Index int + Reason string + type ExportedUserRecord struct + PasswordHash string + PasswordSalt string + type FirebaseInfo struct + Identities map[string]interface{} + SignInProvider string + Tenant string + type GetUsersResult struct + NotFound []UserIdentifier + Users []*UserRecord + type MultiFactorInfo struct + DisplayName string + EnrollmentTimestamp int64 + FactorID string + PhoneNumber string + UID string + type MultiFactorSettings struct + EnrolledFactors []*MultiFactorInfo + type OIDCProviderConfig struct + ClientID string + DisplayName string + Enabled bool + ID string + Issuer string + type OIDCProviderConfigIterator struct + func (it *OIDCProviderConfigIterator) Next() (*OIDCProviderConfig, error) + func (it *OIDCProviderConfigIterator) PageInfo() *iterator.PageInfo + type OIDCProviderConfigToCreate struct + func (config *OIDCProviderConfigToCreate) ClientID(clientID string) *OIDCProviderConfigToCreate + func (config *OIDCProviderConfigToCreate) DisplayName(name string) *OIDCProviderConfigToCreate + func (config *OIDCProviderConfigToCreate) Enabled(enabled bool) *OIDCProviderConfigToCreate + func (config *OIDCProviderConfigToCreate) ID(id string) *OIDCProviderConfigToCreate + func (config *OIDCProviderConfigToCreate) Issuer(issuer string) *OIDCProviderConfigToCreate + type OIDCProviderConfigToUpdate struct + func (config *OIDCProviderConfigToUpdate) ClientID(clientID string) *OIDCProviderConfigToUpdate + func (config *OIDCProviderConfigToUpdate) DisplayName(name string) *OIDCProviderConfigToUpdate + func (config *OIDCProviderConfigToUpdate) Enabled(enabled bool) *OIDCProviderConfigToUpdate + func (config *OIDCProviderConfigToUpdate) Issuer(issuer string) *OIDCProviderConfigToUpdate + type PhoneIdentifier struct + PhoneNumber string + type ProviderIdentifier struct + ProviderID string + ProviderUID string + type SAMLProviderConfig struct + CallbackURL string + DisplayName string + Enabled bool + ID string + IDPEntityID string + RPEntityID string + RequestSigningEnabled bool + SSOURL string + X509Certificates []string + type SAMLProviderConfigIterator struct + func (it *SAMLProviderConfigIterator) Next() (*SAMLProviderConfig, error) + func (it *SAMLProviderConfigIterator) PageInfo() *iterator.PageInfo + type SAMLProviderConfigToCreate struct + func (config *SAMLProviderConfigToCreate) CallbackURL(url string) *SAMLProviderConfigToCreate + func (config *SAMLProviderConfigToCreate) DisplayName(name string) *SAMLProviderConfigToCreate + func (config *SAMLProviderConfigToCreate) Enabled(enabled bool) *SAMLProviderConfigToCreate + func (config *SAMLProviderConfigToCreate) ID(id string) *SAMLProviderConfigToCreate + func (config *SAMLProviderConfigToCreate) IDPEntityID(entityID string) *SAMLProviderConfigToCreate + func (config *SAMLProviderConfigToCreate) RPEntityID(entityID string) *SAMLProviderConfigToCreate + func (config *SAMLProviderConfigToCreate) RequestSigningEnabled(enabled bool) *SAMLProviderConfigToCreate + func (config *SAMLProviderConfigToCreate) SSOURL(url string) *SAMLProviderConfigToCreate + func (config *SAMLProviderConfigToCreate) X509Certificates(certs []string) *SAMLProviderConfigToCreate + type SAMLProviderConfigToUpdate struct + func (config *SAMLProviderConfigToUpdate) CallbackURL(url string) *SAMLProviderConfigToUpdate + func (config *SAMLProviderConfigToUpdate) DisplayName(name string) *SAMLProviderConfigToUpdate + func (config *SAMLProviderConfigToUpdate) Enabled(enabled bool) *SAMLProviderConfigToUpdate + func (config *SAMLProviderConfigToUpdate) IDPEntityID(entityID string) *SAMLProviderConfigToUpdate + func (config *SAMLProviderConfigToUpdate) RPEntityID(entityID string) *SAMLProviderConfigToUpdate + func (config *SAMLProviderConfigToUpdate) RequestSigningEnabled(enabled bool) *SAMLProviderConfigToUpdate + func (config *SAMLProviderConfigToUpdate) SSOURL(url string) *SAMLProviderConfigToUpdate + func (config *SAMLProviderConfigToUpdate) X509Certificates(certs []string) *SAMLProviderConfigToUpdate + type Tenant struct + AllowPasswordSignUp bool + DisplayName string + EnableEmailLinkSignIn bool + ID string + type TenantClient struct + func (c TenantClient) CreateOIDCProviderConfig(ctx context.Context, config *OIDCProviderConfigToCreate) (*OIDCProviderConfig, error) + func (c TenantClient) CreateSAMLProviderConfig(ctx context.Context, config *SAMLProviderConfigToCreate) (*SAMLProviderConfig, error) + func (c TenantClient) CreateUser(ctx context.Context, user *UserToCreate) (*UserRecord, error) + func (c TenantClient) CustomToken(ctx context.Context, uid string) (string, error) + func (c TenantClient) CustomTokenWithClaims(ctx context.Context, uid string, devClaims map[string]interface{}) (string, error) + func (c TenantClient) DeleteOIDCProviderConfig(ctx context.Context, id string) error + func (c TenantClient) DeleteSAMLProviderConfig(ctx context.Context, id string) error + func (c TenantClient) DeleteUser(ctx context.Context, uid string) error + func (c TenantClient) DeleteUsers(ctx context.Context, uids []string) (*DeleteUsersResult, error) + func (c TenantClient) EmailSignInLink(ctx context.Context, email string, settings *ActionCodeSettings) (string, error) + func (c TenantClient) EmailVerificationLink(ctx context.Context, email string) (string, error) + func (c TenantClient) EmailVerificationLinkWithSettings(ctx context.Context, email string, settings *ActionCodeSettings) (string, error) + func (c TenantClient) GetUser(ctx context.Context, uid string) (*UserRecord, error) + func (c TenantClient) GetUserByEmail(ctx context.Context, email string) (*UserRecord, error) + func (c TenantClient) GetUserByPhoneNumber(ctx context.Context, phone string) (*UserRecord, error) + func (c TenantClient) GetUserByProviderID(ctx context.Context, providerID string, providerUID string) (*UserRecord, error) + func (c TenantClient) GetUserByProviderUID(ctx context.Context, providerID string, providerUID string) (*UserRecord, error) + func (c TenantClient) GetUsers(ctx context.Context, identifiers []UserIdentifier) (*GetUsersResult, error) + func (c TenantClient) ImportUsers(ctx context.Context, users []*UserToImport, opts ...UserImportOption) (*UserImportResult, error) + func (c TenantClient) OIDCProviderConfig(ctx context.Context, id string) (*OIDCProviderConfig, error) + func (c TenantClient) OIDCProviderConfigs(ctx context.Context, nextPageToken string) *OIDCProviderConfigIterator + func (c TenantClient) PasswordResetLink(ctx context.Context, email string) (string, error) + func (c TenantClient) PasswordResetLinkWithSettings(ctx context.Context, email string, settings *ActionCodeSettings) (string, error) + func (c TenantClient) RevokeRefreshTokens(ctx context.Context, uid string) error + func (c TenantClient) SAMLProviderConfig(ctx context.Context, id string) (*SAMLProviderConfig, error) + func (c TenantClient) SAMLProviderConfigs(ctx context.Context, nextPageToken string) *SAMLProviderConfigIterator + func (c TenantClient) SetCustomUserClaims(ctx context.Context, uid string, customClaims map[string]interface{}) error + func (c TenantClient) UpdateOIDCProviderConfig(ctx context.Context, id string, config *OIDCProviderConfigToUpdate) (*OIDCProviderConfig, error) + func (c TenantClient) UpdateSAMLProviderConfig(ctx context.Context, id string, config *SAMLProviderConfigToUpdate) (*SAMLProviderConfig, error) + func (c TenantClient) UpdateUser(ctx context.Context, uid string, user *UserToUpdate) (ur *UserRecord, err error) + func (c TenantClient) Users(ctx context.Context, nextPageToken string) *UserIterator + func (c TenantClient) VerifyIDToken(ctx context.Context, idToken string) (*Token, error) + func (c TenantClient) VerifyIDTokenAndCheckRevoked(ctx context.Context, idToken string) (*Token, error) + func (tc *TenantClient) TenantID() string + type TenantIterator struct + func (it *TenantIterator) Next() (*Tenant, error) + func (it *TenantIterator) PageInfo() *iterator.PageInfo + type TenantManager struct + func (tm *TenantManager) AuthForTenant(tenantID string) (*TenantClient, error) + func (tm *TenantManager) CreateTenant(ctx context.Context, tenant *TenantToCreate) (*Tenant, error) + func (tm *TenantManager) DeleteTenant(ctx context.Context, tenantID string) error + func (tm *TenantManager) Tenant(ctx context.Context, tenantID string) (*Tenant, error) + func (tm *TenantManager) Tenants(ctx context.Context, nextPageToken string) *TenantIterator + func (tm *TenantManager) UpdateTenant(ctx context.Context, tenantID string, tenant *TenantToUpdate) (*Tenant, error) + type TenantToCreate struct + func (t *TenantToCreate) AllowPasswordSignUp(allow bool) *TenantToCreate + func (t *TenantToCreate) DisplayName(name string) *TenantToCreate + func (t *TenantToCreate) EnableEmailLinkSignIn(enable bool) *TenantToCreate + type TenantToUpdate struct + func (t *TenantToUpdate) AllowPasswordSignUp(allow bool) *TenantToUpdate + func (t *TenantToUpdate) DisplayName(name string) *TenantToUpdate + func (t *TenantToUpdate) EnableEmailLinkSignIn(enable bool) *TenantToUpdate + type Token struct + Audience string + AuthTime int64 + Claims map[string]interface{} + Expires int64 + Firebase FirebaseInfo + IssuedAt int64 + Issuer string + Subject string + UID string + type UIDIdentifier struct + UID string + type UserIdentifier interface + type UserImportHash interface + Config func() (internal.HashConfig, error) + type UserImportOption interface + func WithHash(hash UserImportHash) UserImportOption + type UserImportResult struct + Errors []*ErrorInfo + FailureCount int + SuccessCount int + type UserInfo struct + DisplayName string + Email string + PhoneNumber string + PhotoURL string + ProviderID string + UID string + type UserIterator struct + func (it *UserIterator) Next() (*ExportedUserRecord, error) + func (it *UserIterator) PageInfo() *iterator.PageInfo + type UserMetadata struct + CreationTimestamp int64 + LastLogInTimestamp int64 + LastRefreshTimestamp int64 + type UserProvider struct + DisplayName string + Email string + PhotoURL string + ProviderID string + UID string + type UserRecord struct + CustomClaims map[string]interface{} + Disabled bool + EmailVerified bool + MultiFactor *MultiFactorSettings + ProviderUserInfo []*UserInfo + TenantID string + TokensValidAfterMillis int64 + UserMetadata *UserMetadata + type UserToCreate struct + func (u *UserToCreate) Disabled(disabled bool) *UserToCreate + func (u *UserToCreate) DisplayName(name string) *UserToCreate + func (u *UserToCreate) Email(email string) *UserToCreate + func (u *UserToCreate) EmailVerified(verified bool) *UserToCreate + func (u *UserToCreate) Password(pw string) *UserToCreate + func (u *UserToCreate) PhoneNumber(phone string) *UserToCreate + func (u *UserToCreate) PhotoURL(url string) *UserToCreate + func (u *UserToCreate) UID(uid string) *UserToCreate + type UserToImport struct + func (u *UserToImport) CustomClaims(claims map[string]interface{}) *UserToImport + func (u *UserToImport) Disabled(disabled bool) *UserToImport + func (u *UserToImport) DisplayName(displayName string) *UserToImport + func (u *UserToImport) Email(email string) *UserToImport + func (u *UserToImport) EmailVerified(emailVerified bool) *UserToImport + func (u *UserToImport) Metadata(metadata *UserMetadata) *UserToImport + func (u *UserToImport) PasswordHash(password []byte) *UserToImport + func (u *UserToImport) PasswordSalt(salt []byte) *UserToImport + func (u *UserToImport) PhoneNumber(phoneNumber string) *UserToImport + func (u *UserToImport) PhotoURL(url string) *UserToImport + func (u *UserToImport) ProviderData(providers []*UserProvider) *UserToImport + func (u *UserToImport) UID(uid string) *UserToImport + type UserToUpdate struct + func (u *UserToUpdate) CustomClaims(claims map[string]interface{}) *UserToUpdate + func (u *UserToUpdate) Disabled(disabled bool) *UserToUpdate + func (u *UserToUpdate) DisplayName(name string) *UserToUpdate + func (u *UserToUpdate) Email(email string) *UserToUpdate + func (u *UserToUpdate) EmailVerified(verified bool) *UserToUpdate + func (u *UserToUpdate) Password(pw string) *UserToUpdate + func (u *UserToUpdate) PhoneNumber(phone string) *UserToUpdate + func (u *UserToUpdate) PhotoURL(url string) *UserToUpdate + func (u *UserToUpdate) ProviderToLink(userProvider *UserProvider) *UserToUpdate + func (u *UserToUpdate) ProvidersToDelete(providerIds []string) *UserToUpdate Other modules containing this package github.com/D-Cous/firebase-admin-go github.com/D-Cous/firebase-admin-go/v4