FIRAuth


@interface FIRAuth : NSObject

Manages authentication for Firebase apps. This class is thread-safe.

  • Gets the auth object for the default Firebase app. The default Firebase app must have already been configured or an exception will be raised.

    Declaration

    Objective-C

    + (nonnull FIRAuth *)auth;
  • Gets the auth object for a FIRApp.

    Declaration

    Objective-C

    + (nonnull FIRAuth *)authWithApp:(nonnull FIRApp *)app;

    Parameters

    app

    The FIRApp for which to retrieve the associated FIRAuth instance.

    Return Value

    The FIRAuth instance associated with the given FIRApp.

  • app

    Gets the FIRApp object that this auth object is connected to.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) FIRApp *app;
  • Synchronously gets the cached current user, or null if there is none.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nullable) FIRUser *currentUser;
  • The current user language code. This property can be set to the app’s current language by calling useAppLanguage.

    The string used to set this property must be a language code that follows BCP 47.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) NSString *languageCode;
  • Contains settings related to the auth object.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) FIRAuthSettings *settings;
  • The current user access group that the Auth instance is using. Default is nil.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable) NSString *userAccessGroup;
  • The APNs token used for phone number authentication. The type of the token (production or sandbox) will be attempted to be automatcially detected. If swizzling is disabled, the APNs Token must be set for phone number auth to work, by either setting this property or by calling setAPNSToken:type:

    Declaration

    Objective-C