internal FirebaseAuth(FirebaseAuthArgs args)
 {
     args.ThrowIfNull(nameof(args));
     this.tokenFactory    = args.TokenFactory.ThrowIfNull(nameof(args.TokenFactory));
     this.idTokenVerifier = args.IdTokenVerifier.ThrowIfNull(nameof(args.IdTokenVerifier));
     this.userManager     = args.UserManager.ThrowIfNull(nameof(args.UserManager));
 }
        /// <summary>
        /// Returns the auth instance for the specified app.
        /// </summary>
        /// <returns>The <see cref="FirebaseAuth"/> instance associated with the specified
        /// app.</returns>
        /// <exception cref="System.ArgumentNullException">If the app argument is null.</exception>
        /// <param name="app">An app instance.</param>
        public static FirebaseAuth GetAuth(FirebaseApp app)
        {
            if (app == null)
            {
                throw new ArgumentNullException("App argument must not be null.");
            }

            return(app.GetOrInit <FirebaseAuth>(typeof(FirebaseAuth).Name, () =>
            {
                return new FirebaseAuth(FirebaseAuthArgs.Create(app));
            }));
        }