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

@appaflytech/wappa-auth

v0.0.5

Published

Drop-in end-user authentication for Expo / React Native and web apps, powered by the Wappa panel. Email/password + Firebase Google/Apple social login, refresh tokens, profile and password reset — one config, one hook.

Readme

@appaflytech/wappa-auth

Drop-in end-user authentication for Expo / React Native and web apps, powered by the Wappa panel. Email/password auth, refresh tokens, profile, and password reset — one config, one hook. No native dependencies; token storage is auto-detected per platform.

yarn add @appaflytech/wappa-auth
# Optional, for persistent sessions on React Native (pick one):
expo install expo-secure-store
# or
yarn add @react-native-async-storage/async-storage

Web uses localStorage automatically. React Native uses expo-secure-store (preferred) or @react-native-async-storage/async-storage if installed; otherwise sessions are in-memory only.

Configuration

Pass config directly (works everywhere), or set env vars:

# Expo
EXPO_PUBLIC_WAPPA_KEY=<panel-site-key>
EXPO_PUBLIC_WAPPA_API_BASE_URL=https://wappa-ui-api.appaflytech.com
# Next.js / web
NEXT_PUBLIC_WAPPA_SITE_KEY=<panel-site-key>
NEXT_PUBLIC_WAPPA_API=https://wappa-ui-api.appaflytech.com

React usage (mobile or web)

Wrap your app once, then use the hook anywhere:

import { WappaAuthProvider, useWappaAuth } from '@appaflytech/wappa-auth'

export default function App() {
  return (
    <WappaAuthProvider config={{ siteKey: 'coffee' }}>
      <Screens />
    </WappaAuthProvider>
  )
}

function LoginScreen() {
  const { login, register, user, loading, isAuthenticated, logout } = useWappaAuth()

  if (loading) return null
  if (isAuthenticated) return <Text>Hi {user?.firstname} <Button title="Çıkış" onPress={logout} /></Text>

  return (
    <Button
      title="Giriş"
      onPress={() => login('[email protected]', 'secret').catch((e) => alert(e.message))}
    />
  )
}

Imperative usage (no React)

import { initWappaAuth } from '@appaflytech/wappa-auth'

const auth = await initWappaAuth({ siteKey: 'coffee' })

await auth.register({ email, password, firstname: 'Ada', lastname: 'Lovelace' })
await auth.login(email, password)
const me = await auth.me()
await auth.updateProfile({ phoneNumber: '5551112233' })
await auth.changePassword('old', 'new')
await auth.forgotPassword(email, 'https://app.example.com/reset') // emails a reset link
await auth.resetPassword(tokenFromEmail, 'newPass')
auth.getAccessToken() // attach to your own API calls
await auth.logout()

API

| Method | Description | | --- | --- | | register(input) | Create an end-user and sign in. email + password + firstname + lastname required. | | login(email, password) | Sign in. | | logout() | Clear the local session. | | me() | Fetch fresh profile. | | updateProfile(input) | Update profile fields. | | changePassword(old, new) | Change password. | | forgotPassword(email, resetUrlBase?) | Email a reset link/token. Always resolves. | | resetPassword(token, newPassword) | Complete reset; clears session. | | getUser() / getAccessToken() / isAuthenticated() | Local accessors. | | refresh() | Force a token refresh. |

  • Authenticated calls auto-refresh the access token once on a 401.
  • Errors throw a WappaAuthError with .status and .body.

Custom storage

initWappaAuth({
  siteKey: 'coffee',
  storage: {
    getItem: async (k) => /* ... */ null,
    setItem: async (k, v) => {},
    removeItem: async (k) => {},
  },
})

Social login (Firebase Google / Apple)

Headless, like the rest of the package — it exposes methods, you design the buttons.

1. Configure in the panel

Admin UI → Kullanıcılar → Giriş Yöntemleri: toggle Google/Apple, set the Firebase Project ID, and upload google-services.json + GoogleService-Info.plist (downloaded from the Firebase console). The panel is the single source of truth; download them again anytime.

2. Wire the app (once)

npx wappa-auth setup        # patches app.json, prints the file paths + install commands
npx expo install @react-native-firebase/app @react-native-firebase/auth \
  @react-native-google-signin/google-signin expo-apple-authentication
# Download the two files from the panel → project root, then:
npx expo prebuild --clean && npx pod-install

3. Use the methods

const { loginWithGoogle, loginWithApple } = useWappaAuth()

// Your own button, your own styling:
<Pressable onPress={loginWithGoogle}><Text>Google ile devam et</Text></Pressable>
<Pressable onPress={loginWithApple}><Text>Apple ile devam et</Text></Pressable>

google.webClientId and which providers are enabled come from the panel at startup (settings.authProviders) — feed webClientId into the provider config:

<WappaAuthProvider config={{ siteKey, apiUrl, google: { webClientId } }}>

Already run the native flow yourself? Skip the helpers and pass the token in:

await loginWithFirebase(firebaseIdToken, 'google')

Under the hood, the app sends the Firebase ID token to POST auth/sign-in-firebase; the backend verifies it against the site's Firebase project and returns the same session as email/password.

Panel side

Manage these users from Admin UI → Kullanıcılar (list, create, ban, reset password, login history) and configure password-reset email delivery under Kullanıcılar → Mail Ayarları (SMTP).