class Firebase::Admin::Auth::UserRecord

A Firebase User account

Public Instance Methods

custom_claims() click to toggle source

Gets any custom claims set on this user account.

# File lib/firebase/admin/auth/user_record.rb, line 57
def custom_claims
  claims = @data["customAttributes"]
  parsed = JSON.parse(claims) unless claims.nil?
  parsed if parsed.is_a?(Hash) && !parsed.empty?
end
disabled?() click to toggle source
# File lib/firebase/admin/auth/user_record.rb, line 24
def disabled?
  !!@data["disabled"]
end
email_verified?() click to toggle source
# File lib/firebase/admin/auth/user_record.rb, line 20
def email_verified?
  !!@data["emailVerified"]
end
provider_data() click to toggle source

Gets a list of (UserInfo) instances.

Each object represents an identity from an identity provider that is linked to this user.

@return [Array of UserInfo]

# File lib/firebase/admin/auth/user_record.rb, line 51
def provider_data
  providers = @data["providerUserInfo"] || []
  providers.to_a.map { |p| UserInfo.new(p) }
end
provider_id() click to toggle source

Gets the id of the identity provider.

Always firebase for user accounts.

# File lib/firebase/admin/auth/user_record.rb, line 16
def provider_id
  "firebase"
end
tenant_id() click to toggle source

Returns the tenant ID of this user.

# File lib/firebase/admin/auth/user_record.rb, line 64
def tenant_id
  raise NotImplementedError
end
tokens_valid_after_timestamp() click to toggle source

Gets the time, in milliseconds since the epoch, before which tokens are invalid.

@note truncated to 1 second accuracy.

@return [Numeric]

Timestamp in milliseconds since the epoch, truncated to the second.
All tokens issued before that time are considered revoked.
# File lib/firebase/admin/auth/user_record.rb, line 35
def tokens_valid_after_timestamp
  raise NotImplementedError
end
uid() click to toggle source

Gets the ID of this user.

# File lib/firebase/admin/auth/user_record.rb, line 9
def uid
  @data["localId"]
end
user_metadata() click to toggle source

Gets additional metadata associated with this user.

@return [UserMetadata]

# File lib/firebase/admin/auth/user_record.rb, line 42
def user_metadata
  raise NotImplementedError
end