@aldel/react-firebase-login
    Preparing search index...

    Function FirebaseLogin

    • A React component that provides Firebase Authentication to its children. If the user is authenticated (and other requirements are met, such as requiring email verification when enabled), the children are rendered unaltered. Otherwise a UI is displayed that allows the user to sign in (and verify their email address if required).

      Components inside this wrapper can access user data and other controls via the useAuth hook.

      Parameters

      • __namedParameters: FirebaseLoginProps

        The props for the FirebaseLogin component.

        The props for the FirebaseLogin component.

        • OptionalallowAnonymous?: boolean

          If true, the user does not need to sign in; they will automatically be signed in anonymously, and the children will be displayed. The login UI is displayed only when the signIn function, provided by the useAuth hook, is called. If signIn is called with its link argument set to true, when the user then signs in, the anonymous account will be upgraded to a normal account with an email address.

          The login UI is displayed with a "cancel" button so the user can dismiss it.

          If allowAnonymous and requireVerification are both true, the user will be required to verify their email address only when they sign in.

        • Optionalauth?: Auth

          The Firebase Auth instance to use. If not provided, the default auth instance will be used.

        • Optionalchildren?: React.ReactNode

          The children to render when the user is authenticated.

        • A footer to display below the login buttons.

        • Optionalframe?: FrameFunction

          A function that modifies the login UI. When any login UI is displayed, it is first passed through this function. This may be used to add extra decoration around the login UI.

          The default is noFrame, which passes the login UI through unchanged. See fullPageFrame for another example.

        • A header to display above the login buttons.

        • Optionalmethods?: LoginMethodList

          The login methods that will be displayed to the user, in the order that they will be displayed.

        • Optionalredirect?: boolean

          If true, federated login methods will sign in with a redirect. Otherwise, the sign-in will be done with a popup. If using redirect, you should follow best practices and be aware that it won't work locally without the emulator.

        • OptionalrequireVerification?: boolean

          Defaults to true. If true, users will be required to verify their email address when they sign up. With some providers (e.g. Google), verification is automatic. With phone login, verification is automatically bypassed.

        • OptionalsocialLoginButtonProps?: Parameters<typeof GoogleLoginButton>[0]

          Props to pass through to the "Sign in with" buttons. See react-social-login-buttons for supported props. The onClick and disabled props will not work, since they are used internally.

      Returns
          | undefined
          | null
          | string
          | number
          | bigint
          | boolean
          | Element
          | Iterable<ReactNode, any, any>
          | Promise<AwaitedReactNode>