ionic-enterprise-sdk-migration
Skill75 starsChanged 32 days agoMITView on GitHub
Migrates Capacitor apps off Ionic Enterprise SDK plugins - @ionic-enterprise/auth (Auth Connect), @ionic-enterprise/identity-vault (Identity Vault), and @ionic-enterprise/secure-storage (Secure Storage) - to @capgo/capacitor-social-login (OAuth2/OIDC for Azure AD, Auth0, Okta, Cognito, plus Google/Apple), @capgo/capacitor-native-biometric (biometric-protected Keychain/Keystore credential vault), and @capgo/capacitor-fast-sql or @capgo/capacitor-data-storage-sqlite (encrypted storage). Use when package.json has @ionic-enterprise/* packages, code imports AuthConnect, BrowserVault/Vault/DeviceSecurityType, or SQLite from secure-storage, or the user needs to move stored tokens without logging users out. Do not use for Ionic Appflow live updates or builds (ionic-appflow-migration), generic SQLite plugin swaps (sqlite-to-fast-sql), Capacitor version upgrades (capacitor-app-upgrades), or Capgo live updates (capgo-live-updates).
- Installs packages
2 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- capawesome-team/skillstheir own version, first seen Mar 24, 2026
- Aver005/agent-skillsedited, first seen Feb 14, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- Aver005/agent-skills★ 213% same
Wrote their own version · 1
- capawesome-team/skills★ 54same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository56 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- capacitor-accessibilitySkill
- capacitor-app-intentsSkill
- capacitor-apple-review-preflightSkill
- capacitor-app-storeSkill
- capacitor-app-upgradesSkill
- capacitor-app-upgrade-v4-to-v5Skill
- capacitor-app-upgrade-v5-to-v6Skill
- capacitor-app-upgrade-v6-to-v7Skill
- capacitor-app-upgrade-v7-to-v8Skill
- capacitor-app-upgrade-v8-to-v9Skill
- capacitor-best-practicesSkill
- capacitor-ci-cdSkill
- capacitor-deep-linkingSkill
- capacitor-ios-resizabilitySkill
- capacitor-ios-security-hardeningSkill
- capacitor-keyboardSkill
- capacitor-mcpSkill
- capacitor-offline-firstSkill
- capacitor-performanceSkill
- capacitor-plugin-spm-supportSkill
- capacitor-pluginsSkill
- capacitor-plugin-upgradesSkill
- capacitor-plugin-upgrade-v4-to-v5Skill
- capacitor-plugin-upgrade-v5-to-v6Skill
- capacitor-plugin-upgrade-v6-to-v7Skill
- capacitor-plugin-upgrade-v7-to-v8Skill
- capacitor-plugin-upgrade-v8-to-v9Skill
- capacitor-push-notificationsSkill
- capacitor-securitySkill
- capacitor-splash-screenSkill
- capacitor-testingSkill
- capacitor-uiscene-migrationSkill
- capawesome-live-update-migrationSkill
- capgo-cli-usageSkill
- capgo-cloudSkill
- capgo-live-updatesSkill
- capgo-native-buildsSkill
- capgo-organization-managementSkill
- capgo-release-managementSkill
- capgo-release-workflowsSkill
- cocoapods-to-spmSkill
- cordova-to-capacitorSkill
- debugging-capacitorSkill
- framework-to-capacitorSkill
- ionic-appflow-migrationSkill
- ionic-designSkill
- ios-android-logsSkill
- konsta-uiSkill
- safe-area-handlingSkill
- skill-creatorSkill
- sqlite-to-fast-sqlSkill
- subscription-app-revenueSkill
- tailwind-capacitorSkill
- webapp-to-capacitorSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Do not use for:
- Distinctive: line 61
If the user accepts a forced re-login for everyone, a single release is fine.
- Distinctive: line 70
Keep the same client IDs, scopes, and redirect URIs.
- Very specific: line 118
Keep the same schema; port queries (executeSql -> db.query / db.run / db.executeBatch / db.transaction).
- Very specific: line 131
Remove the Ionic Enterprise registry/token lines from .npmrc only after no enterprise package remains (CI installs fail otherwise).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Ionic Enterprise SDK Migration
Replace Ionic Enterprise plugins with open Capgo plugins one at a time, preserving login sessions and stored data.
Context: Ionic stopped selling its commercial products (including the Enterprise SDK) in February 2025 and is winding down maintenance; plan migrations before the license or support window ends.
When to Use
TRIGGER when:
package.jsoncontains@ionic-enterprise/auth,@ionic-enterprise/identity-vault, or@ionic-enterprise/secure-storage.- Code imports
AuthConnect,ProviderOptions,Vault,BrowserVault,VaultType,DeviceSecurityType, or Secure Storage'sSQLite/KeyValueStorage. - The user asks how to replace Auth Connect, Identity Vault, or Secure Storage without forcing re-login.
Do not use for:
- Appflow Live Updates / builds ->
ionic-appflow-migration. - Community or other SQLite plugins ->
sqlite-to-fast-sql. - Biometric UX or general security review ->
capacitor-security.
Live Project Snapshot
Detected Ionic Enterprise and replacement packages:
!node -e "const fs=require('fs');if(!fs.existsSync('package.json'))process.exit(0);const pkg=JSON.parse(fs.readFileSync('package.json','utf8'));const out=[];for(const section of ['dependencies','devDependencies']){for(const [name,version] of Object.entries(pkg[section]||{})){if(name.startsWith('@ionic-enterprise/')||name.startsWith('@capgo/')||name==='@capacitor/preferences'||name==='@capacitor/core')out.push(section+'.'+name+'='+version)}}console.log(out.sort().join('\n'))"
Replacement Map
| Ionic Enterprise | Replacement | Covers | Not covered (rebuild in app) |
| Auth Connect | @capgo/capacitor-social-login (provider: 'oauth2' for OIDC/OAuth2 IdPs; google, apple, facebook, etc.) | Authorization code + PKCE, token refresh (refreshToken), logout, native Apple/Google sign-in | Token storage policy (store tokens with Native Biometric or encrypted SQL) |
| Identity Vault | @capgo/capacitor-native-biometric | Save/read/delete credentials in Keychain/Keystore; accessControl: BIOMETRY_CURRENT_SET or BIOMETRY_ANY makes reads require biometrics; verifyIdentity with passcode fallback on iOS; biometryChange listener | Inactivity lock timeout, privacy screen on background (@capacitor/privacy-screen), custom-passcode vaults, in-memory vaults |
| Secure Storage (SQLite) | @capgo/capacitor-fast-sql with encrypted: true + encryptionKey | Encrypted SQLite (SQLCipher), transactions, batch, KeyValueStore | Key management - keep the DB key in Native Biometric, not in JS constants |
| Secure Storage (key-value) | @capgo/capacitor-data-storage-sqlite or Fast SQL KeyValueStore | Simple encrypted key-value |
Non-sensitive settings can go to @capacitor/preferences. Never move tokens or secrets there.
Procedure
Step 1: Detect and plan
rg -n "@ionic-enterprise/" -g '!node_modules' .List each enterprise package, every call site, and what is stored (keys, DB names, vault config: type, deviceSecurityType, lockAfterBackgrounded, unlockVaultOnLoad). Migrate one plugin per release when more than one is present. Report the plan before editing.
Step 2: Plan data carry-over (two-release rule)
Old plugin data can only be read while the old plugin is still installed. For tokens, vault values, or encrypted DBs:
- Release N: install the Capgo replacement alongside the enterprise plugin. On first launch, read from the old store, write to the new one, set a
migratedflag, then clear the old store. - Release N+1 (after most users have opened release N): remove the enterprise plugin.
If the user accepts a forced re-login for everyone, a single release is fine; confirm this explicitly.
Step 3: Auth Connect -> Social Login
npm install @capgo/capacitor-social-login
npx cap sync- Keep the same client IDs, scopes, and redirect URIs; register any new native redirect (custom scheme or universal link) with the IdP before shipping.
- Map each Auth Connect provider (Azure, Auth0, Okta, Cognito, generic OIDC) to an
oauth2entry inSocialLogin.initialize({ oauth2: { <providerId>: { ... } } })withclientId/appId,issuerUrlorauthorizationBaseUrl+accessTokenEndpoint,redirectUrl, and scopes. Check the plugin's OAuth2 docs for the exact fields of the installed version. - Replace
AuthConnect.login/logout/refreshSession/isAccessTokenExpiredwithSocialLogin.login({ provider: 'oauth2', options: { providerId } }),logout,refreshToken, and your own expiry check on the returned token. - Compare the before/after authorization request (scopes,
prompt, audience) and token response in a test tenant.
Step 4: Identity Vault -> Native Biometric
npm install @capgo/capacitor-native-biometric
npx cap syncimport { NativeBiometric, AccessControl } from '@capgo/capacitor-native-biometric';
await NativeBiometric.setCredentials({
server: 'com.company.app.session',
username: userId,
password: refreshToken,
accessControl: AccessControl.BIOMETRY_CURRENT_SET,
});
const { password: token } = await NativeBiometric.getSecureCredentials({
server: 'com.company.app.session',
reason: 'Unlock your account',
});lockAfterBackgrounded-> onAppresume, if elapsed time exceeds the timeout, show a lock screen and callgetSecureCredentialsagain.DeviceSecurityType.Both/ passcode fallback ->verifyIdentitysupports device passcode fallback on iOS; protected credential reads stay biometric-only.BIOMETRY_CURRENT_SETinvalidates the item when biometrics change (like Identity Vault's strict mode);BIOMETRY_ANYsurvives enrollment changes.- Privacy screen in app switcher ->
@capacitor/privacy-screen. - iOS: add
NSFaceIDUsageDescriptiontoInfo.plist.
Step 5: Secure Storage -> Fast SQL or Data Storage SQLite
npm install @capgo/capacitor-fast-sql
npx cap syncimport { FastSQL, KeyValueStore } from '@capgo/capacitor-fast-sql';
const db = await FastSQL.connect({ database: 'app', encrypted: true, encryptionKey });
const kv = await KeyValueStore.open({ database: 'kv', encrypted: true, encryptionKey });- Keep the same schema; port queries (
executeSql->db.query/db.run/db.executeBatch/db.transaction). - Encryption requires SQLCipher: Android
implementation 'net.zetetic:sqlcipher-android:<version>'inandroid/app/build.gradle; iOS CocoaPods subspecCapgoCapacitorFastSql/SQLCipher. Without it,encrypted: truefails withEncryption is not available in this buildon iOS. - Fast SQL runs a localhost HTTP server: add
NSAppTransportSecurity->NSAllowsLocalNetworking(iOS) and a localhost cleartextnetwork_security_config.xml(Android). Seesqlite-to-fast-sqlfor the full setup. - Store
encryptionKeywith Native Biometric (Step 4) or derive it server-side; never hard-code it.
Step 6: Clean up
npm uninstall @ionic-enterprise/auth @ionic-enterprise/identity-vault @ionic-enterprise/secure-storage
rg -n "@ionic-enterprise" -g '!node_modules' .
npx cap syncRemove the Ionic Enterprise registry/token lines from .npmrc only after no enterprise package remains (CI installs fail otherwise).
Verification
- Upgrade test: install the current store build, log in, store data; install the new build over it; user stays logged in and data is present.
- Fresh install: login, token refresh, logout, and biometric unlock work on real iOS and Android devices (simulators cannot fully test biometrics).
- Change device biometrics:
BIOMETRY_CURRENT_SETitems become unreadable and the app falls back to login. rg -n "@ionic-enterprise" -g '!node_modules' .returns nothing after the final release.npm cisucceeds in CI without Ionic Enterprise registry credentials.
Error Handling
| Problem | Fix |
npm error 401 Unauthorized / 404 for @ionic-enterprise/* in CI | Enterprise registry token expired; finish removal or keep the token until release N+1 |
| Users logged out after update | Data not carried over; ship the dual-plugin release N first |
redirect_uri_mismatch / IdP error after switching | Register the new redirect URL with the IdP; keep scopes identical |
Encryption is not available in this build | Add the SQLCipher dependency/subspec, rebuild |
| Fast SQL calls fail with network errors | Missing ATS local networking / Android cleartext config for localhost |
| Biometric read fails after enrollment change | Expected with BIOMETRY_CURRENT_SET; re-authenticate and save again |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

