Passer au contenu

@capgo/capacitor-persistent-Compte

Manage Utilisateur accounts with persistent storage, secure session handling, and seamless authentication across Application sessions.

The Capacitor Persistent Compte plugin enables secure storage and persistence of Utilisateur Compte data between Application installations. This plugin ensures that Utilisateur Compte Information remains Disponible even after Application reinstalls, providing seamless Utilisateur experience and Compte continuity.

Cross-install persistence

Data survives Application uninstall/reinstall cycles 💾

Secure storage

Secure Compte data storage with system integration 🔐

Simple API

Clean read/write interface for Compte management 📊

Cross-platform

Natif iOS and Android implementation 📱

Terminal window
npm install @capgo/capacitor-persistent-account
npx cap sync
  • saveAccount(options: { data: unknown }) - Securely save account data to persistent storage
  • readAccount() - Retrieve stored account data, returns Promise<{ data: unknown | null }>
  • Cross-Installation persistence: Compte data survives Application uninstall and reinstall
  • Secure storage: Uses platform-specific secure storage mechanisms
  • Type flexibility: Store any serializable Compte data structure
  • Cross-platform Support: Natif implementation for both iOS and Android
import { PersistentAccount } from '@capgo/capacitor-persistent-account';
// Define your account data structure
interface UserAccount {
userId: string;
username: string;
email: string;
preferences: {
theme: string;
notifications: boolean;
};
}
// Save account data
const accountData: UserAccount = {
userId: '12345',
username: 'john_doe',
email: 'john@example.com',
preferences: {
theme: 'dark',
notifications: true
}
};
await PersistentAccount.saveAccount({ data: accountData });
// Read account data
const result = await PersistentAccount.readAccount();
if (result.data) {
const account = result.data as UserAccount;
console.log('Restored account:', account.username);
} else {
console.log('No account data found');
}
  • Utilisateur onboarding: Preserve Utilisateur progress through Application reinstalls
  • Compte recovery: Restore Utilisateur sessions after Application Mises à jour
  • Preferences storage: Maintain Utilisateur Paramètres and configurations
  • Offline-first apps: Store essential Utilisateur data locally
  • Utilizes iOS Keychain Services for secure, persistent storage
  • Data survives Application deletion and Appareil restores
  • Uses Android Compte Manager or shared preferences with backup
  • Maintains data across Application reinstalls and Appareil migrations
  • Compte data is stored using platform-specific secure storage
  • Consider data Chiffrement for sensitive Information
  • Implement proper data validation when reading stored accounts
  • Follow platform guidelines for Utilisateur data handling

Vérifier the Terminé Documentation for detailed implementation guides and best practices.