npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@exclusive118/expo-firebase-cred-manager

v0.1.2

Published

Expo module for Firebase Auth and Android Credential Manager flows

Readme

@exclusive118/expo-firebase-cred-manager

Expo module for Firebase Auth and Android Credential Manager flows.

This package is Android-first. On iOS/web, methods throw E_UNSUPPORTED_PLATFORM (except isAvailable, which returns false).

Install

npm install @exclusive118/expo-firebase-cred-manager

Expo Plugin Setup

In app.json:

{
  "expo": {
    "plugins": [
      [
        "@exclusive118/expo-firebase-cred-manager",
        {
          "googleServicesFile": "./google-services.json"
        }
      ]
    ]
  }
}

Plugin options:

  • googleServicesFile (required): path to Android google-services.json
  • webClientId (optional): override Google Web OAuth client ID
  • hostedDomainFilter (optional): hosted domain filter for Google button flow

If webClientId is not provided, the plugin auto-detects it from google-services.json (oauth_client entry where client_type is 3).

Usage

import {
  signInWithEmailPassword,
  signUpWithEmailPassword,
  savePasswordCredential,
  signInWithGoogleButton,
  signInWithGoogleBottomSheet,
  signOut,
  deleteCurrentUser,
  addAuthStateListener,
  clearCredentialState,
  getCurrentSession,
  isAvailable,
} from '@exclusive118/expo-firebase-cred-manager';

API return values

Most exported methods are async and return a Promise. addAuthStateListener returns a subscription object synchronously.

| Function | Resolves with | | --- | --- | | isAvailable() | Promise<boolean> | | getCurrentSession(input?) | Promise<AuthResult \| null> | | signInWithEmailPassword(input) | Promise<AuthResult> | | signUpWithEmailPassword(input) | Promise<AuthResult> | | savePasswordCredential(input) | Promise<{ saved: true }> | | signInWithGoogleButton(input?) | Promise<AuthResult> | | signInWithGoogleBottomSheet(input?) | Promise<AuthResult> | | signOut(options?) | Promise<void> | | deleteCurrentUser(options?) | Promise<void> | | addAuthStateListener(listener) | AuthStateSubscription | | clearCredentialState() | Promise<void> |

deleteCurrentUser(options?) behavior:

  • clearCredentialState defaults to true
  • reauthenticateIfRequired defaults to true
  • webClientId/nonce are optional and used for Google reauthentication when recent login is required

Note: clearCredentialState clears provider session state in Credential Manager. It does not guarantee removal of saved passwords/passkeys.

addAuthStateListener(listener) behavior:

  • Emits onAuthStateChanged whenever Firebase auth state changes.
  • Listener receives { session: AuthStateSession | null }.
  • session includes provider and user fields; if signed out, session is null.
  • Use subscription.remove() to stop listening.

Error codes

Rejections are ExpoFirebaseCredManagerError objects (an Error plus a code field):

type ExpoFirebaseCredManagerError = Error & { code: ExpoFirebaseCredManagerErrorCode };
try {
  const session = await getCurrentSession();
} catch (error) {
  const e = error as { code?: string; message?: string };
  if (e.code === 'E_UNSUPPORTED_PLATFORM') {
    // handle Android-only behavior
  }
}

ExpoFirebaseCredManagerErrorCode values:

E_UNSUPPORTED_PLATFORM, E_INVALID_INPUT, E_NO_ACTIVITY, E_GOOGLE_WEB_CLIENT_ID_REQUIRED, E_GOOGLE_ID_TOKEN_PARSE, E_UNSUPPORTED_CREDENTIAL, E_UNEXPECTED_CREDENTIAL_TYPE, E_CANCELLED, E_INTERRUPTED, E_NO_CREDENTIAL, E_PROVIDER_CONFIGURATION, E_CUSTOM, E_UNKNOWN, E_GET_CREDENTIAL, E_CREATE_CREDENTIAL, E_NO_CREATE_OPTION, E_CLEAR_CREDENTIAL_STATE, E_AUTH_INVALID_CREDENTIALS, E_AUTH_INVALID_USER, E_AUTH_REQUIRES_RECENT_LOGIN, E_AUTH_REAUTH_REQUIRED, E_AUTH_EMAIL_ALREADY_IN_USE, E_AUTH_WEAK_PASSWORD, E_AUTH, E_ID_TOKEN_UNAVAILABLE.

Delete-specific recovery notes:

  • E_AUTH_REQUIRES_RECENT_LOGIN: deleting the user requires a recent login and automatic reauthentication was disabled.
  • E_AUTH_REAUTH_REQUIRED: automatic reauthentication failed (for example cancelled, no credential, mismatch, or invalid credential). Prompt sign-in and retry delete.

AuthResult shape:

type AuthResult = {
  idToken: string;
  provider: 'password' | 'google';
  isNewUser: boolean | null;
  user: {
    uid: string;
    email: string | null;
    displayName: string | null;
    photoURL: string | null;
    emailVerified: boolean;
    isAnonymous: boolean;
    creationTimestamp: number | null;
    lastSignInTimestamp: number | null;
  };
};