{"_id":"@alperen06/react-native-login-template","_rev":"2-6a6f38bf2bfeab8e4daa929529567016","name":"@alperen06/react-native-login-template","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@alperen06/react-native-login-template","version":"1.0.0","keywords":["react-native","expo","firebase","authentication","template"],"author":{"name":"Alperen Kabadayi","email":"alperen_kabadayi@hotmail.com"},"license":"MIT","_id":"@alperen06/react-native-login-template@1.0.0","maintainers":[{"name":"alperen06","email":"alperen_kabadayi@hotmail.com"}],"homepage":"https://github.com/alperenkbd/React-Native-OAuth-Firebase-Login-Template#readme","bugs":{"url":"https://github.com/alperenkbd/React-Native-OAuth-Firebase-Login-Template/issues"},"dist":{"shasum":"00379b9327e80994a17269396999189c5b562c7e","tarball":"https://registry.npmjs.org/@alperen06/react-native-login-template/-/react-native-login-template-1.0.0.tgz","fileCount":57,"integrity":"sha512-6VgUwQh7qta4Kcjr8mNFcEU2KJQv7PNcu0t3bggEWunlf2UfyStIZxZYznAG+GM0Mw2cNiuvXXq/sxOm28zdiA==","signatures":[{"sig":"MEQCIHoSDw9tuc3pm5ULq0/3LoKuxkK6A3Fs/yu9pN0EdQRVAiAcnjxaOeiMU2SA1HFw2RvlAOMtmzYSrKEZzngebCH/Qg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":336783},"main":"App.js","gitHead":"78c1e751e163f47069e4171faaccc21c858c4dd2","private":false,"scripts":{"ios":"expo start --ios","web":"expo start --web","lint":"expo lint","start":"expo start","android":"expo start --android","reset-project":"node ./scripts/reset-project.js"},"_npmUser":{"name":"alperen06","email":"alperen_kabadayi@hotmail.com"},"repository":{"url":"git+https://github.com/alperenkbd/React-Native-OAuth-Firebase-Login-Template.git","type":"git"},"_npmVersion":"10.9.2","description":"A comprehensive React Native authentication template with Firebase, featuring modern UI components, secure token management, and rate limiting","directories":{},"_nodeVersion":"22.15.0","dependencies":{"expo":"~53.0.17","react":"19.0.0","firebase":"^11.2.0","expo-blur":"~14.1.5","expo-font":"~13.3.2","react-dom":"19.0.0","expo-image":"~2.3.2","expo-haptics":"~14.1.4","expo-linking":"~7.1.7","expo-symbols":"~0.4.5","react-native":"0.79.5","expo-constants":"~17.1.7","expo-system-ui":"~5.0.10","expo-status-bar":"~2.2.3","expo-web-browser":"~14.2.0","react-native-web":"~0.20.0","expo-secure-store":"~14.1.1","@expo/vector-icons":"^14.1.0","expo-splash-screen":"~0.30.10","react-native-screens":"~4.11.1","react-native-webview":"13.13.5","@react-navigation/stack":"^7.4.2","react-native-reanimated":"~3.17.4","@react-navigation/native":"^7.1.14","@react-navigation/elements":"^2.3.8","react-native-gesture-handler":"~2.24.0","@react-navigation/bottom-tabs":"^7.3.10","react-native-safe-area-context":"5.4.0","@react-native-async-storage/async-storage":"^2.1.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.25.0","typescript":"~5.8.3","@babel/core":"^7.25.2","@types/react":"~19.0.10","eslint-config-expo":"~9.2.0"},"_npmOperationalInternal":{"tmp":"tmp/react-native-login-template_1.0.0_1752665769781_0.7214111265562766","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@alperen06/react-native-login-template","main":"App.js","version":"1.0.1","description":"A comprehensive React Native authentication template with Firebase, featuring modern UI components, secure token management, and rate limiting","keywords":["react-native","expo","firebase","authentication","template"],"author":{"name":"Alperen Kabadayi","email":"alperen_kabadayi@hotmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/alperenkbd/React-Native-OAuth-Firebase-Login-Template.git"},"scripts":{"start":"expo start","reset-project":"node ./scripts/reset-project.js","android":"expo start --android","ios":"expo start --ios","web":"expo start --web","lint":"expo lint"},"dependencies":{"@expo/vector-icons":"^14.1.0","@react-navigation/bottom-tabs":"^7.3.10","@react-navigation/elements":"^2.3.8","@react-navigation/native":"^7.1.14","@react-navigation/stack":"^7.4.2","@react-native-async-storage/async-storage":"^2.1.0","expo":"~53.0.17","expo-blur":"~14.1.5","expo-constants":"~17.1.7","expo-font":"~13.3.2","expo-haptics":"~14.1.4","expo-image":"~2.3.2","expo-linking":"~7.1.7","expo-secure-store":"~14.1.1","expo-splash-screen":"~0.30.10","expo-status-bar":"~2.2.3","expo-symbols":"~0.4.5","expo-system-ui":"~5.0.10","expo-web-browser":"~14.2.0","firebase":"^11.2.0","react":"19.0.0","react-dom":"19.0.0","react-native":"0.79.5","react-native-gesture-handler":"~2.24.0","react-native-reanimated":"~3.17.4","react-native-safe-area-context":"5.4.0","react-native-screens":"~4.11.1","react-native-web":"~0.20.0","react-native-webview":"13.13.5"},"devDependencies":{"@babel/core":"^7.25.2","@types/react":"~19.0.10","typescript":"~5.8.3","eslint":"^9.25.0","eslint-config-expo":"~9.2.0"},"private":false,"_id":"@alperen06/react-native-login-template@1.0.1","gitHead":"505eaafa36e2daab40d2d1d3b5296d939cacc612","bugs":{"url":"https://github.com/alperenkbd/React-Native-OAuth-Firebase-Login-Template/issues"},"homepage":"https://github.com/alperenkbd/React-Native-OAuth-Firebase-Login-Template#readme","_nodeVersion":"22.15.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-GJ1Vz8Wh6DyxjzTTvouI5te8Km8KbycAGaW5Do/ukV6LfpoXuMI0wypk3mRRj1N4C24i+AHFpzX/c/caArg1DA==","shasum":"ff788f22376cfc6ce1beb7c1ca171ff3a80a82e5","tarball":"https://registry.npmjs.org/@alperen06/react-native-login-template/-/react-native-login-template-1.0.1.tgz","fileCount":57,"unpackedSize":336085,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHrgHfwXvMuAWCNDpMmKY83qUokdfuN04eZgQocUIBPzAiBBgZzQ/JmgOiiW7Tn43HwDOsYxIaVri9UBdh/ELYEO7w=="}]},"_npmUser":{"name":"alperen06","email":"alperen_kabadayi@hotmail.com"},"directories":{},"maintainers":[{"name":"alperen06","email":"alperen_kabadayi@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-native-login-template_1.0.1_1752677339916_0.6983344181854372"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-16T11:36:09.659Z","modified":"2025-07-16T14:49:00.298Z","1.0.0":"2025-07-16T11:36:10.047Z","1.0.1":"2025-07-16T14:49:00.100Z"},"bugs":{"url":"https://github.com/alperenkbd/React-Native-OAuth-Firebase-Login-Template/issues"},"author":{"name":"Alperen Kabadayi","email":"alperen_kabadayi@hotmail.com"},"license":"MIT","homepage":"https://github.com/alperenkbd/React-Native-OAuth-Firebase-Login-Template#readme","keywords":["react-native","expo","firebase","authentication","template"],"repository":{"type":"git","url":"git+https://github.com/alperenkbd/React-Native-OAuth-Firebase-Login-Template.git"},"description":"A comprehensive React Native authentication template with Firebase, featuring modern UI components, secure token management, and rate limiting","maintainers":[{"name":"alperen06","email":"alperen_kabadayi@hotmail.com"}],"readme":"# React Native Login Template\r\n\r\nA comprehensive React Native authentication template with Firebase, featuring modern UI components, secure token management, and rate limiting.\r\n\r\n## 🚀 Features\r\n\r\n- **🔐 Firebase Authentication** - Complete email/password authentication\r\n- **📱 Modern UI** - Beautiful, accessible components with dark mode support\r\n- **🔄 JWT Token Management** - Automatic token refresh and secure storage\r\n- **💾 Secure Storage** - Cross-platform secure storage with AsyncStorage fallback\r\n- **🚦 Rate Limiting** - Built-in rate limiting with exponential backoff\r\n- **📡 Context API** - Global state management for authentication\r\n- **🧭 React Navigation** - Smooth navigation between auth and app flows\r\n- **✨ TypeScript Ready** - Fully typed for better development experience\r\n- **🎨 Customizable** - Easy to customize colors, fonts, and layouts\r\n\r\n## 📁 Project Structure\r\n\r\n```\r\nsrc/\r\n├── api/\r\n│   └── firebase.js          # Firebase configuration and initialization\r\n├── auth/\r\n│   ├── AuthProvider.js      # Context provider for authentication state\r\n│   ├── authActions.js       # Authentication actions (login, register, logout)\r\n│   └── useAuth.js           # Custom hook for auth operations\r\n├── components/\r\n│   ├── CustomButton.js      # Reusable button component\r\n│   └── CustomInput.js       # Reusable input component with validation\r\n├── navigation/\r\n│   ├── AppStack.js          # Navigation for authenticated users\r\n│   ├── AuthStack.js         # Navigation for unauthenticated users\r\n│   └── RootNavigator.js     # Main navigation controller\r\n├── screens/\r\n│   ├── HomeScreen.js        # Main app screen\r\n│   ├── LoginScreen.js       # Login form\r\n│   ├── ProfileScreen.js     # User profile and settings\r\n│   └── RegisterScreen.js    # Registration form\r\n├── utils/\r\n│   ├── delay.js             # Rate limiting utilities\r\n│   └── storage.js           # Secure storage utilities\r\n└── App.js                   # Main app component\r\n```\r\n\r\n## 🛠 Setup\r\n\r\n### 1. Install Dependencies\r\n\r\n```bash\r\nnpm install\r\n# or\r\nyarn install\r\n```\r\n\r\n### 2. Firebase Setup\r\n\r\n1. Create a new project at [Firebase Console](https://console.firebase.google.com/)\r\n2. Enable Authentication with Email/Password\r\n3. Get your configuration from Project Settings\r\n4. Copy `env.example` to `.env`\r\n5. Fill in your Firebase configuration:\r\n\r\n```env\r\nEXPO_PUBLIC_FIREBASE_API_KEY=your_api_key\r\nEXPO_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com\r\nEXPO_PUBLIC_FIREBASE_PROJECT_ID=your_project_id\r\nEXPO_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.firebasestorage.app\r\nEXPO_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id\r\nEXPO_PUBLIC_FIREBASE_APP_ID=your_app_id\r\n```\r\n\r\n### 3. Run the App\r\n\r\n```bash\r\nnpm start\r\n# or\r\nyarn start\r\n```\r\n\r\n## 🔧 Configuration\r\n\r\n### Rate Limiting\r\n\r\nConfigure rate limiting in `src/utils/delay.js`:\r\n\r\n```javascript\r\nconst RATE_LIMIT_CONFIG = {\r\n  MAX_LOGIN_ATTEMPTS: 5,\r\n  MAX_REGISTER_ATTEMPTS: 3,\r\n  LOGIN_COOLDOWN_MINUTES: 15,\r\n  REGISTER_COOLDOWN_MINUTES: 5,\r\n  BASE_DELAY_MS: 1000,\r\n  MAX_DELAY_MS: 10000,\r\n};\r\n```\r\n\r\n### UI Customization\r\n\r\nColors and styling can be customized in each component's StyleSheet. Common colors used:\r\n\r\n- Primary: `#007AFF`\r\n- Secondary: `#F2F2F7`\r\n- Success: `#34C759`\r\n- Warning: `#FF9500`\r\n- Error: `#FF3B30`\r\n- Text: `#1D1D1F`\r\n- Secondary Text: `#8E8E93`\r\n\r\n## 📱 Usage\r\n\r\n### Authentication Hook\r\n\r\n```javascript\r\nimport { useAuth } from './src/auth/useAuth';\r\n\r\nconst MyComponent = () => {\r\n  const {\r\n    // State\r\n    isAuthenticated,\r\n    user,\r\n    isLoading,\r\n    error,\r\n    \r\n    // Actions\r\n    login,\r\n    register,\r\n    logout,\r\n    resetPassword,\r\n    clearError,\r\n    \r\n    // Computed values\r\n    userEmail,\r\n    userId,\r\n    userDisplayName,\r\n    isEmailVerified,\r\n  } = useAuth();\r\n\r\n  return (\r\n    // Your component JSX\r\n  );\r\n};\r\n```\r\n\r\n### Custom Components\r\n\r\n#### CustomButton\r\n\r\n```javascript\r\nimport CustomButton from './src/components/CustomButton';\r\n\r\n<CustomButton\r\n  title=\"Sign In\"\r\n  onPress={handleLogin}\r\n  loading={isLoading}\r\n  variant=\"primary\" // primary, secondary, outline, text\r\n  size=\"medium\"     // small, medium, large\r\n/>\r\n```\r\n\r\n#### CustomInput\r\n\r\n```javascript\r\nimport CustomInput from './src/components/CustomInput';\r\n\r\n<CustomInput\r\n  label=\"Email\"\r\n  placeholder=\"Enter your email\"\r\n  value={email}\r\n  onChangeText={setEmail}\r\n  keyboardType=\"email-address\"\r\n  error={emailError}\r\n  required\r\n/>\r\n```\r\n\r\n## 🔒 Security Features\r\n\r\n- **Secure Storage**: Uses Expo SecureStore on mobile, AsyncStorage on web\r\n- **Token Management**: Automatic JWT refresh and secure storage\r\n- **Rate Limiting**: Prevents brute force attacks with exponential backoff\r\n- **Input Validation**: Client-side validation for forms\r\n- **Error Handling**: Comprehensive error handling with user-friendly messages\r\n\r\n## 🚀 Deployment\r\n\r\n### Building for Production\r\n\r\n```bash\r\n# Build for iOS\r\nexpo build:ios\r\n\r\n# Build for Android\r\nexpo build:android\r\n\r\n# Or use EAS Build (recommended)\r\neas build --platform all\r\n```\r\n\r\n### Environment Variables\r\n\r\nMake sure to set up environment variables in your deployment platform:\r\n- Vercel: Add to project settings\r\n- Netlify: Add to build environment\r\n- EAS: Use `eas secret:create`\r\n\r\n## 🤝 Contributing\r\n\r\n1. Fork the repository\r\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\r\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\r\n4. Push to the branch (`git push origin feature/AmazingFeature`)\r\n5. Open a Pull Request\r\n\r\n## 📄 License\r\n\r\nThis project is licensed under the MIT License - see the LICENSE file for details.\r\n\r\n## 🆘 Support\r\n\r\nIf you have any questions or run into issues:\r\n\r\n1. Check the [Issues](https://github.com/your-username/react-native-login-template/issues) page\r\n2. Create a new issue with detailed information\r\n3. Include device information, error messages, and steps to reproduce\r\n\r\n## 🙏 Acknowledgments\r\n\r\n- [Expo](https://expo.dev/) for the amazing development platform\r\n- [Firebase](https://firebase.google.com/) for authentication services\r\n- [React Navigation](https://reactnavigation.org/) for navigation\r\n- The React Native community for inspiration and support\r\n\r\n---\r\n\r\nBuilt with ❤️ for the React Native community\r\n","readmeFilename":"README.md"}