{"_id":"@appaflytech/wappa-auth","_rev":"5-87e59c3a21e109d68d1a06ad542e02c1","name":"@appaflytech/wappa-auth","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.1":{"name":"@appaflytech/wappa-auth","version":"0.0.1","keywords":["wappa","auth","authentication","expo","react-native","web","jwt","login"],"author":{"name":"Appafly Tech"},"license":"MIT","_id":"@appaflytech/wappa-auth@0.0.1","maintainers":[{"name":"emrahyurttutan","email":"emrah@yurttutan.net"},{"name":"appa-tech","email":"appaflytech@gmail.com"}],"dist":{"shasum":"6b94dc95ec9b34243ce83ca9a0f42eb2fde17e58","tarball":"https://registry.npmjs.org/@appaflytech/wappa-auth/-/wappa-auth-0.0.1.tgz","fileCount":31,"integrity":"sha512-pvLdVsHu/G4PPtVb/FvFzpAw91V3JAaSQ/HN9VN0nUwrwrGbNj11nVzJ9ZoXkBPyZjN7CtGDztUvMDwwrmAcpw==","signatures":[{"sig":"MEQCIAfYfwfRYPmURUy7p+0e+GXHILbPf8EYhzD5kEXrAZ7rAiBy/cwzQ7T5Oh7kgrVgZkuucsUO4vrpiR7qboXNu6iQcA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49901},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"726dcf7011c6bb7d2040beff2069a12225f6a8ef","scripts":{"build":"tsc -p tsconfig.json","clean":"rimraf dist","prepare":"npm run build","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"emrahyurttutan","email":"emrah@yurttutan.net"},"_npmVersion":"11.5.1","description":"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.","directories":{},"sideEffects":false,"_nodeVersion":"24.6.0","react-native":"dist/index.js","_hasShrinkwrap":false,"devDependencies":{"rimraf":"^5.0.0","typescript":"^5.4.0","@types/react":"^18.2.0"},"peerDependencies":{"react":">=17.0.0"},"peerDependenciesMeta":{"react":{"optional":true},"expo-secure-store":{"optional":true},"@react-native-async-storage/async-storage":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/wappa-auth_0.0.1_1782197161469_0.17411481513591998","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@appaflytech/wappa-auth","version":"0.0.2","keywords":["wappa","auth","authentication","expo","react-native","web","jwt","login"],"author":{"name":"Appafly Tech"},"license":"MIT","_id":"@appaflytech/wappa-auth@0.0.2","maintainers":[{"name":"emrahyurttutan","email":"emrah@yurttutan.net"},{"name":"appa-tech","email":"appaflytech@gmail.com"}],"dist":{"shasum":"74eea03ee45ef65ae9355dafc0bf540edbae2e7a","tarball":"https://registry.npmjs.org/@appaflytech/wappa-auth/-/wappa-auth-0.0.2.tgz","fileCount":31,"integrity":"sha512-O0MJxbdNmC8GSApa+FWG9JiVn9f8jJpy1M6UzhnsKjjh3cP12Y9tCsVVGU2BKPq233wwTcGU9AeyjzqUyoEELg==","signatures":[{"sig":"MEYCIQC6x212T4jimBQSS5ILlUHgiV4o/8OgnEPurvHpMg0TOwIhAJpzk3CcSiK8ryK8vVrf2zIM5hcTLYAvVqOZe3uxIZ+E","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49900},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"77c51cee8371ed23404a6b6346b18dab598655f5","scripts":{"build":"tsc -p tsconfig.json","clean":"rimraf dist","prepare":"npm run build","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"GitLab CI/CD","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"gitlab","oidcConfigId":"oidc:2bf00c22-5c55-4ed8-aa0b-581ea982018f"}},"_npmVersion":"11.18.0","description":"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.","directories":{},"sideEffects":false,"_nodeVersion":"22.23.1","react-native":"dist/index.js","_hasShrinkwrap":false,"devDependencies":{"rimraf":"^5.0.0","typescript":"^5.4.0","@types/react":"^18.2.0"},"peerDependencies":{"react":">=17.0.0"},"peerDependenciesMeta":{"react":{"optional":true},"expo-secure-store":{"optional":true},"@react-native-async-storage/async-storage":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/wappa-auth_0.0.2_1782830267546_0.04852429004238057","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@appaflytech/wappa-auth","version":"0.0.3","keywords":["wappa","auth","authentication","expo","react-native","web","jwt","login"],"author":{"name":"Appafly Tech"},"license":"MIT","_id":"@appaflytech/wappa-auth@0.0.3","maintainers":[{"name":"emrahyurttutan","email":"emrah@yurttutan.net"},{"name":"appa-tech","email":"appaflytech@gmail.com"}],"bin":{"wappa-auth":"bin/wappa-auth.js"},"dist":{"shasum":"99fde49713dc6cd75028339b87c7fcef91dd5fb1","tarball":"https://registry.npmjs.org/@appaflytech/wappa-auth/-/wappa-auth-0.0.3.tgz","fileCount":38,"integrity":"sha512-1J6jN74AJ5hAntx/UKq0fFgz/JyMXk9nD2sLl5M3v/g1iqeAHjQsCauyP5fwHcSnwNz8/CAEbe0SWtMgh7FMlQ==","signatures":[{"sig":"MEUCIQDNbTpq/LeZyqdUwuBG1PUA4Ik2N3y6DiVRhG88AUjn9wIgLBqXaVS3npGRx9Zpqtx7ZW1VphGBOmwQr50y+0XFyuA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":72801},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"f3f7f9163e8bf2f82c7425955bee404b5b4a546c","scripts":{"build":"tsc -p tsconfig.json","clean":"rimraf dist","prepare":"npm run build","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"GitLab CI/CD","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"gitlab","oidcConfigId":"oidc:2bf00c22-5c55-4ed8-aa0b-581ea982018f"}},"_npmVersion":"11.18.0","description":"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.","directories":{},"sideEffects":false,"_nodeVersion":"22.23.1","react-native":"dist/index.js","_hasShrinkwrap":false,"devDependencies":{"rimraf":"^5.0.0","typescript":"^5.4.0","@types/react":"^18.2.0"},"peerDependencies":{"react":">=17.0.0"},"peerDependenciesMeta":{"react":{"optional":true},"expo-secure-store":{"optional":true},"@react-native-firebase/app":{"optional":true},"@react-native-firebase/auth":{"optional":true},"@react-native-async-storage/async-storage":{"optional":true},"@react-native-google-signin/google-signin":{"optional":true},"@invertase/react-native-apple-authentication":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/wappa-auth_0.0.3_1783420107734_0.9907270094783538","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@appaflytech/wappa-auth","version":"0.0.4","keywords":["wappa","auth","authentication","expo","react-native","web","jwt","login"],"author":{"name":"Appafly Tech"},"license":"MIT","_id":"@appaflytech/wappa-auth@0.0.4","maintainers":[{"name":"emrahyurttutan","email":"emrah@yurttutan.net"},{"name":"appa-tech","email":"appaflytech@gmail.com"}],"bin":{"wappa-auth":"bin/wappa-auth.js"},"dist":{"shasum":"60e6a2156ef51aa00f9009158f2dd264666eb921","tarball":"https://registry.npmjs.org/@appaflytech/wappa-auth/-/wappa-auth-0.0.4.tgz","fileCount":38,"integrity":"sha512-VWpE7seNADCquf2WX1Kx0cUBToFV0hmz0RiVm5kRFldYdSb1C1nBStcaQsrD4AgJB4+qHeXtrVNHLY4Yd5QfCQ==","signatures":[{"sig":"MEUCIQDV0om8qVI50hZyfcOInqbgbGI4/ld3C6MDKYww9TCTkAIgW9c3jeNc2ViJTC4oVEQsuFb26zEwTkbpqkx+bQAN1Fo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":72426},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"d843ae88b5878bc666f0bcaad5cf6f5dc10f11e0","scripts":{"build":"tsc -p tsconfig.json","clean":"rimraf dist","prepare":"npm run build","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"GitLab CI/CD","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"gitlab","oidcConfigId":"oidc:2bf00c22-5c55-4ed8-aa0b-581ea982018f"}},"_npmVersion":"11.18.0","description":"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.","directories":{},"sideEffects":false,"_nodeVersion":"22.23.1","react-native":"dist/index.js","_hasShrinkwrap":false,"devDependencies":{"rimraf":"^5.0.0","typescript":"^5.4.0","@types/react":"^18.2.0"},"peerDependencies":{"react":">=17.0.0"},"peerDependenciesMeta":{"react":{"optional":true},"expo-secure-store":{"optional":true},"expo-apple-authentication":{"optional":true},"@react-native-firebase/app":{"optional":true},"@react-native-firebase/auth":{"optional":true},"@react-native-async-storage/async-storage":{"optional":true},"@react-native-google-signin/google-signin":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/wappa-auth_0.0.4_1783429188942_0.4029311092800303","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@appaflytech/wappa-auth","version":"0.0.5","description":"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.","main":"dist/index.js","module":"dist/index.js","react-native":"dist/index.js","types":"dist/index.d.ts","bin":{"wappa-auth":"bin/wappa-auth.js"},"sideEffects":false,"scripts":{"clean":"rimraf dist","build":"tsc -p tsconfig.json","prepare":"npm run build","prepublishOnly":"npm run clean && npm run build"},"keywords":["wappa","auth","authentication","expo","react-native","web","jwt","login"],"author":{"name":"Appafly Tech"},"license":"MIT","peerDependencies":{"react":">=17.0.0"},"peerDependenciesMeta":{"react":{"optional":true},"@react-native-async-storage/async-storage":{"optional":true},"expo-secure-store":{"optional":true},"@react-native-firebase/app":{"optional":true},"@react-native-firebase/auth":{"optional":true},"@react-native-google-signin/google-signin":{"optional":true},"expo-apple-authentication":{"optional":true}},"devDependencies":{"@types/react":"^18.2.0","rimraf":"^5.0.0","typescript":"^5.4.0"},"gitHead":"940d86e9f436933edce8a92d5d8b38d2137196d3","_id":"@appaflytech/wappa-auth@0.0.5","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-0ll8TigPLlkPZRDI5IMxVKfHzmHXVvWyE/8Dhl5Ou+DjCe8HOApq+m3ek9k6PONIiBh+CxmzWIWIK9buyJxJ9A==","shasum":"20fabd541326c9bf435c7d7ea00690204ffeb734","tarball":"https://registry.npmjs.org/@appaflytech/wappa-auth/-/wappa-auth-0.0.5.tgz","fileCount":38,"unpackedSize":72426,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD9/v4EtPGyv81WDnAF9M/YIHfMQYtz9vxWouzCwhySrQIhAIVbtMg8+jEJ2BjAm8hppPrNV5AtCulMZbeYHhNFnmKQ"}]},"_npmUser":{"name":"GitLab CI/CD","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"gitlab","oidcConfigId":"oidc:2bf00c22-5c55-4ed8-aa0b-581ea982018f"}},"directories":{},"maintainers":[{"name":"emrahyurttutan","email":"emrah@yurttutan.net"},{"name":"appa-tech","email":"appaflytech@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wappa-auth_0.0.5_1783670719120_0.32929337029561956"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-23T06:46:01.254Z","modified":"2026-07-10T08:05:19.435Z","0.0.1":"2026-06-23T06:46:01.604Z","0.0.2":"2026-06-30T14:37:47.681Z","0.0.3":"2026-07-07T10:28:27.860Z","0.0.4":"2026-07-07T12:59:49.092Z","0.0.5":"2026-07-10T08:05:19.294Z"},"author":{"name":"Appafly Tech"},"license":"MIT","keywords":["wappa","auth","authentication","expo","react-native","web","jwt","login"],"description":"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.","maintainers":[{"name":"emrahyurttutan","email":"emrah@yurttutan.net"},{"name":"appa-tech","email":"appaflytech@gmail.com"}],"readme":"# @appaflytech/wappa-auth\n\nDrop-in **end-user authentication** for Expo / React Native **and** web apps, powered by the\nWappa panel. Email/password auth, refresh tokens, profile, and password reset — one config,\none hook. No native dependencies; token storage is auto-detected per platform.\n\n```bash\nyarn add @appaflytech/wappa-auth\n# Optional, for persistent sessions on React Native (pick one):\nexpo install expo-secure-store\n# or\nyarn add @react-native-async-storage/async-storage\n```\n\n> Web uses `localStorage` automatically. React Native uses `expo-secure-store` (preferred) or\n> `@react-native-async-storage/async-storage` if installed; otherwise sessions are in-memory only.\n\n## Configuration\n\nPass config directly (works everywhere), or set env vars:\n\n```bash\n# Expo\nEXPO_PUBLIC_WAPPA_KEY=<panel-site-key>\nEXPO_PUBLIC_WAPPA_API_BASE_URL=https://wappa-ui-api.appaflytech.com\n# Next.js / web\nNEXT_PUBLIC_WAPPA_SITE_KEY=<panel-site-key>\nNEXT_PUBLIC_WAPPA_API=https://wappa-ui-api.appaflytech.com\n```\n\n## React usage (mobile or web)\n\nWrap your app once, then use the hook anywhere:\n\n```tsx\nimport { WappaAuthProvider, useWappaAuth } from '@appaflytech/wappa-auth'\n\nexport default function App() {\n  return (\n    <WappaAuthProvider config={{ siteKey: 'coffee' }}>\n      <Screens />\n    </WappaAuthProvider>\n  )\n}\n\nfunction LoginScreen() {\n  const { login, register, user, loading, isAuthenticated, logout } = useWappaAuth()\n\n  if (loading) return null\n  if (isAuthenticated) return <Text>Hi {user?.firstname} <Button title=\"Çıkış\" onPress={logout} /></Text>\n\n  return (\n    <Button\n      title=\"Giriş\"\n      onPress={() => login('user@example.com', 'secret').catch((e) => alert(e.message))}\n    />\n  )\n}\n```\n\n## Imperative usage (no React)\n\n```ts\nimport { initWappaAuth } from '@appaflytech/wappa-auth'\n\nconst auth = await initWappaAuth({ siteKey: 'coffee' })\n\nawait auth.register({ email, password, firstname: 'Ada', lastname: 'Lovelace' })\nawait auth.login(email, password)\nconst me = await auth.me()\nawait auth.updateProfile({ phoneNumber: '5551112233' })\nawait auth.changePassword('old', 'new')\nawait auth.forgotPassword(email, 'https://app.example.com/reset') // emails a reset link\nawait auth.resetPassword(tokenFromEmail, 'newPass')\nauth.getAccessToken() // attach to your own API calls\nawait auth.logout()\n```\n\n## API\n\n| Method | Description |\n| --- | --- |\n| `register(input)` | Create an end-user and sign in. `email` + `password` + `firstname` + `lastname` required. |\n| `login(email, password)` | Sign in. |\n| `logout()` | Clear the local session. |\n| `me()` | Fetch fresh profile. |\n| `updateProfile(input)` | Update profile fields. |\n| `changePassword(old, new)` | Change password. |\n| `forgotPassword(email, resetUrlBase?)` | Email a reset link/token. Always resolves. |\n| `resetPassword(token, newPassword)` | Complete reset; clears session. |\n| `getUser()` / `getAccessToken()` / `isAuthenticated()` | Local accessors. |\n| `refresh()` | Force a token refresh. |\n\n- Authenticated calls **auto-refresh** the access token once on a `401`.\n- Errors throw a `WappaAuthError` with `.status` and `.body`.\n\n## Custom storage\n\n```ts\ninitWappaAuth({\n  siteKey: 'coffee',\n  storage: {\n    getItem: async (k) => /* ... */ null,\n    setItem: async (k, v) => {},\n    removeItem: async (k) => {},\n  },\n})\n```\n\n## Social login (Firebase Google / Apple)\n\nHeadless, like the rest of the package — it exposes methods, **you design the buttons**.\n\n### 1. Configure in the panel\n\n**Admin UI → Kullanıcılar → Giriş Yöntemleri**: toggle Google/Apple, set the Firebase Project ID,\nand upload `google-services.json` + `GoogleService-Info.plist` (downloaded from the Firebase\nconsole). The panel is the single source of truth; download them again anytime.\n\n### 2. Wire the app (once)\n\n```bash\nnpx wappa-auth setup        # patches app.json, prints the file paths + install commands\nnpx expo install @react-native-firebase/app @react-native-firebase/auth \\\n  @react-native-google-signin/google-signin expo-apple-authentication\n# Download the two files from the panel → project root, then:\nnpx expo prebuild --clean && npx pod-install\n```\n\n### 3. Use the methods\n\n```tsx\nconst { loginWithGoogle, loginWithApple } = useWappaAuth()\n\n// Your own button, your own styling:\n<Pressable onPress={loginWithGoogle}><Text>Google ile devam et</Text></Pressable>\n<Pressable onPress={loginWithApple}><Text>Apple ile devam et</Text></Pressable>\n```\n\n`google.webClientId` and which providers are enabled come from the panel at startup\n(`settings.authProviders`) — feed `webClientId` into the provider config:\n\n```tsx\n<WappaAuthProvider config={{ siteKey, apiUrl, google: { webClientId } }}>\n```\n\nAlready run the native flow yourself? Skip the helpers and pass the token in:\n\n```ts\nawait loginWithFirebase(firebaseIdToken, 'google')\n```\n\nUnder the hood, the app sends the Firebase ID token to `POST auth/sign-in-firebase`; the backend\nverifies it against the site's Firebase project and returns the same session as email/password.\n\n## Panel side\n\nManage these users from **Admin UI → Kullanıcılar** (list, create, ban, reset password, login\nhistory) and configure password-reset email delivery under **Kullanıcılar → Mail Ayarları (SMTP)**.\n","readmeFilename":"README.md"}