Authentication
A package to implement almost full authentication and protect routes with Expo Router.
@flexnative/authentication
handles user authentication and protecting routes using Expo Router.
The package includes React context, custom hooks, type definitions, and utilizes expo-secure-store
for secure token storage.
This integration enhances the security and manageability of authentication processes across the application.
The FlexNative Authentication is part of the FlexNative and is available under the @flexnative/authentication
NPM package.
Installation
You can installing FlexNative Authentication packages using npm:
npm i @flexnative/authentication
Dependencies
📄️ AuthContext
AuthContext, set up a React Context
📄️ useAuthState
useAuthState is a basic hook that persists tokens securely on native with expo-secure-store and in local storage on web.
🗃️ Utilities
2 items
📄️ Example
This guide provides an example that demonstrates how to implement authentication and protect routes with Expo Router using @flexnative/authentication.