PHPackages                             projectmata/mobile-secure-storage - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. projectmata/mobile-secure-storage

ActiveNativephp-plugin[Utility &amp; Helpers](/categories/utility)

projectmata/mobile-secure-storage
=================================

Custom secure storage plugin for NativePHP Mobile

v1.0.0(1mo ago)19↓100%MITKotlinPHP ^8.1

Since Apr 25Pushed 1mo agoCompare

[ Source](https://github.com/jomarmata24/mobile-secure-storage)[ Packagist](https://packagist.org/packages/projectmata/mobile-secure-storage)[ RSS](/packages/projectmata-mobile-secure-storage/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Projectmata Mobile Secure Storage
=================================

[](#projectmata-mobile-secure-storage)

[![Latest Version](https://camo.githubusercontent.com/de80369106b59521d1b6440574f7f5653a9d79fd527858677fd70e2e6198b1a6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70726f6a6563746d6174612f6d6f62696c652d7365637572652d73746f726167652e737667)](https://packagist.org/packages/projectmata/mobile-secure-storage)[![Total Downloads](https://camo.githubusercontent.com/0cd2770d1c452e62601af31c81b031c943d55c90ec0a75079b3a01e966fb894d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70726f6a6563746d6174612f6d6f62696c652d7365637572652d73746f726167652e737667)](https://packagist.org/packages/projectmata/mobile-secure-storage)[![License](https://camo.githubusercontent.com/7ede6d104b878199ed3015b2a6037b276fb750b3ad504e7df97cc5ec7a620584/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f70726f6a6563746d6174612f6d6f62696c652d7365637572652d73746f726167652e737667)](https://packagist.org/packages/projectmata/mobile-secure-storage)

Encrypted key-value storage plugin for [NativePHP Mobile](https://nativephp.com). Backed by Android Keystore AES-GCM encryption and iOS Keychain.

Use it for API tokens, refresh tokens, small credentials, or any small string you don't want sitting in plain `SharedPreferences` / `UserDefaults`.

Requirements
------------

[](#requirements)

- PHP `^8.1`
- Laravel `^11.0` or `^12.0` / `^13.0`
- `nativephp/mobile`
- Android: `min_version 33`
- iOS: `min_version 18.2`

Installation
------------

[](#installation)

```
composer require projectmata/mobile-secure-storage
```

Laravel auto-discovery registers the service provider and facade automatically.

Rebuild the mobile app so the native plugin is bundled:

```
php artisan native:run android
# or
php artisan native:run ios
```

Usage
-----

[](#usage)

### PHP (Laravel)

[](#php-laravel)

```
use Projectmata\MobileSecureStorage\Facades\SecureStorage;

SecureStorage::setItem('auth_token', $token);

$token = SecureStorage::getItem('auth_token');
// ['success' => true, 'value' => '...'] or ['success' => true, 'value' => null] if missing

SecureStorage::removeItem('auth_token');

SecureStorage::clear(); // wipe every key this app has stored
```

### JavaScript (in-app)

[](#javascript-in-app)

The plugin registers itself on `window.NativePHP.SecureStorage`:

```
await window.NativePHP.SecureStorage.SetItem({ key: 'auth_token', value: token });

const { value } = await window.NativePHP.SecureStorage.GetItem({ key: 'auth_token' });

await window.NativePHP.SecureStorage.RemoveItem({ key: 'auth_token' });

await window.NativePHP.SecureStorage.Clear();
```

Or as a bundled import:

```
import SecureStorage, { setItem, getItem } from 'projectmata-mobile-secure-storage';
```

Bridge methods
--------------

[](#bridge-methods)

MethodParamsReturns`SecureStorage.SetItem``{ key, value }``{ success }``SecureStorage.GetItem``{ key }``{ success, value | null }``SecureStorage.RemoveItem``{ key }``{ success }``SecureStorage.Clear`—`{ success }`Platform notes
--------------

[](#platform-notes)

- **Android** — Values are AES-256-GCM encrypted with a key stored in the Android Keystore. Values persist across app launches but are cleared if the app is uninstalled.
- **iOS** — Values are stored in the Keychain with `kSecAttrAccessibleAfterFirstUnlock`. They survive app reinstalls unless you explicitly clear them (Keychain is not tied to the app sandbox in the same way as Android).
- `clear()` only removes keys set by this plugin; it will not touch other Keychain / SharedPreferences entries.

Security caveats
----------------

[](#security-caveats)

Secure storage protects *at rest* on a non-rooted / non-jailbroken device. It is not a substitute for:

- Short-lived / rotating tokens on the server side.
- TLS for data in transit.
- App-level auth gating (see `projectmata/mobile-biometrics`) for high-value actions.

License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance91

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

46d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f5495492f5d4cf3c05ca542a5bbf714e889fdad7a60930fdde6eacf5dfe45151?d=identicon)[ramilojomar2001@gmail.com](/maintainers/ramilojomar2001@gmail.com)

---

Top Contributors

[![jomarmata24](https://avatars.githubusercontent.com/u/64277739?v=4)](https://github.com/jomarmata24 "jomarmata24 (2 commits)")

### Embed Badge

![Health badge](/badges/projectmata-mobile-secure-storage/health.svg)

```
[![Health](https://phpackages.com/badges/projectmata-mobile-secure-storage/health.svg)](https://phpackages.com/packages/projectmata-mobile-secure-storage)
```

###  Alternatives

[fbf/laravel-comments

A Laravel 4 package for adding commenting to a website that has user accounts

204.6k](/packages/fbf-laravel-comments)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
