Type-Definitions

The following type definitions are available globally.

  • The type of handle returned by FIRAuth.addAuthStateDidChangeListener:.

    Declaration

    Swift

    typealias FIRAuthStateDidChangeListenerHandle = NSObjectProtocol

    Objective-C

    typedef id<NSObject> FIRAuthStateDidChangeListenerHandle
  • The type of block which can be registered as a listener for auth state did change events.

    Declaration

    Swift

    typealias FIRAuthStateDidChangeListenerBlock = (FIRAuth, FIRUser?) -> Void

    Objective-C

    typedef void (^FIRAuthStateDidChangeListenerBlock)(FIRAuth *_Nonnull,
                                                       FIRUser *_Nullable)

    Parameters

    auth

    The FIRAuth object on which state changes occurred.

    user

    Optionally; the current signed in user, if any.

  • The type of block invoked when sign-in related events complete.

    Declaration

    Swift

    typealias FIRAuthResultCallback = (FIRUser?, Error?) -> Void

    Objective-C

    typedef void (^FIRAuthResultCallback)(FIRUser *_Nullable, NSError *_Nullable)

    Parameters

    user

    Optionally; the signed in user, if any.

    error

    Optionally; if an error occurs, this is the NSError object that describes the problem. Set to nil otherwise.

  • The type of block invoked when a list of identity providers for a given email address is requested.

    Declaration

    Swift

    typealias FIRProviderQueryCallback = ([String]?, Error?) -> Void

    Objective-C

    typedef void (^FIRProviderQueryCallback)(NSArray<NSString *> *_Nullable,
                                             NSError *_Nullable)

    Parameters

    providers

    Optionally; a list of provider identifiers, if any.

    error

    Optionally; if an error occurs, this is the NSError object that describes the problem. Set to nil otherwise.

  • The type of block invoked when sending a password reset email.

    Declaration

    Swift

    typealias FIRSendPasswordResetCallback = (Error?) -> Void

    Objective-C

    typedef void (^FIRSendPasswordResetCallback)(NSError *_Nullable)

    Parameters

    error

    Optionally; if an error occurs, this is the NSError object that describes the problem. Set to nil otherwise.

  • The type of block invoked when performing a password reset.

    Declaration

    Swift

    typealias FIRConfirmPasswordResetCallback = (Error?) -> Void

    Objective-C

    typedef void (^FIRConfirmPasswordResetCallback)(NSError *_Nullable)

    Parameters

    error

    Optionally; if an error occurs, this is the NSError object that describes the problem. Set to nil otherwise.

  • The type of block invoked when verifying that an out of band code should be used to perform password reset.

    Declaration

    Swift

    typealias FIRVerifyPasswordResetCodeCallback = (String?, Error?) -> Void

    Objective-C

    typedef void (^FIRVerifyPasswordResetCodeCallback)(NSString *_Nullable,
                                                       NSError *_Nullable)

    Parameters

    email

    Optionally; the email address of the user for which the out of band code applies.

    error

    Optionally; if an error occurs, this is the NSError object that describes the problem. Set to nil otherwise.

  • The type of block invoked when applying an action code.

    Declaration

    Swift

    typealias FIRApplyActionCodeCallback = (Error?) -> Void

    Objective-C

    typedef void (^FIRApplyActionCodeCallback)(NSError *_Nullable)

    Parameters

    error

    Optionally; if an error occurs, this is the NSError object that describes the problem. Set to nil otherwise.

  • The type of block invoked when performing a check action code operation.

    Declaration

    Swift

    typealias FIRCheckActionCodeCallBack = (FIRActionCodeInfo?, Error?) -> Void

    Objective-C

    typedef void (^FIRCheckActionCodeCallBack)(FIRActionCodeInfo *_Nullable,
                                               NSError *_Nullable)

    Parameters

    info

    Metadata corresponding to the action code.

    error

    Optionally; if an error occurs, this is the NSError object that describes the problem. Set to nil otherwise.

  • The type of block called when a token is ready for use. - see: FIRUser.getTokenWithCompletion: - see: FIRUser.getTokenForcingRefresh:withCompletion:

    One of: token or error will always be non-nil.

    Declaration

    Swift

    typealias FIRAuthTokenCallback = (String?, Error?) -> Void

    Objective-C

    typedef void (^FIRAuthTokenCallback)(NSString *_Nullable, NSError *_Nullable)

    Parameters

    token

    Optionally; an access token if the request was successful.

    error

    Optionally; the error which occurred - or nil if the request was successful.

  • The type of block called when a user profile change has finished.

    Declaration

    Swift

    typealias FIRUserProfileChangeCallback = (Error?) -> Void

    Objective-C

    typedef void (^FIRUserProfileChangeCallback)(NSError *_Nullable)

    Parameters

    error

    Optionally; the error which occurred - or nil if the request was successful.

  • The type of block called when a request to send an email verification has finished.

    Declaration

    Swift

    typealias FIRSendEmailVerificationCallback = (Error?) -> Void

    Objective-C

    typedef void (^FIRSendEmailVerificationCallback)(NSError *_Nullable)

    Parameters

    error

    Optionally; the error which occurred - or nil if the request was successful.