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

neeyum-auth-module

v1.2.0

Published

A React Native authentication module with OTP-first login and password support

Readme

Neeyum Auth Module

A React Native authentication module with phone number, OTP, and password support.

Features

  • OTP-first login flow
  • Password login option
  • OTP-based registration flow
  • Automatic registration for new users
  • Email verification during registration
  • Bilingual support (English/Tamil)
  • TypeScript support
  • React Navigation integration
  • AsyncStorage for token persistence

Installation

npm install neeyum-auth-module

Peer Dependencies

Make sure you have these installed in your project:

npm install @react-navigation/native @react-navigation/stack @react-native-async-storage/async-storage

Usage

1. Wrap your app with AuthProvider

import { AuthProvider, AuthNavigator } from 'neeyum-auth-module';

export default function App() {
  return (
    <NavigationContainer>
      <AuthProvider>
        <AuthNavigator />
      </AuthProvider>
    </NavigationContainer>
  );
}

2. Use the auth hook in your components

import { useAuth } from 'neeyum-auth-module';

function MyComponent() {
  const { login, register, requestOTP, t, state } = useAuth();
  
  // Use the auth functions and state
}

3. Available Functions

  • login(credentials: { phone: string; password?: string; otp?: string }) - Login with OTP or password
  • register(credentials: { phone: string; name: string; email: string; password: string; otp: string }) - Register with OTP verification
  • requestOTP(phone: string) - Request OTP for login or registration
  • logout() - Logout current user
  • setLanguage(language: { code: string; name: string }) - Change language
  • t(key: string) - Translation function

4. Authentication Flow

Login (OTP First)

  1. User enters phone number
  2. User requests OTP
  3. User enters OTP to login
  4. Option to switch to password login if preferred

Password Login (Alternative)

  1. User switches to password login
  2. User enters phone number and password
  3. Option to switch back to OTP login

Registration (via OTP)

  1. User enters phone number and requests OTP
  2. If phone number doesn't exist, user is redirected to registration
  3. User fills in required fields:
    • Name
    • Email
    • Password (minimum 6 characters)
    • OTP verification
  4. After successful registration, user can login with OTP or password

Configuration

Replace the API URLs in the AuthContext with your backend endpoints:

// In your app
const response = await fetch('YOUR_API_URL/login', ...);
const response = await fetch('YOUR_API_URL/register', ...);
const response = await fetch('YOUR_API_URL/request-otp', ...);

License

MIT