Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then(() => {
// Go for either an encrypted db or encrypted data
// There is a greater performance hit on the encrypted data option
PouchDB.plugin(cordovaSqlitePlugin)
return ctx.db = new PouchDB('app.db', {
adapter: 'cordova-sqlite',
key: 'secret', // <<<<<<<<<<<<< Replace with your secret key
iosDatabaseLocation: 'Documents'
})
// PouchDB.plugin(SecurePouch)
// ctx.db = new PouchDB('app.db')
// ctx.db.securePouch('secret') // <<<<<<<<<<<<< Replace with your secret key
})
.then(res => {
.then(() => {
PouchDB.plugin(SecurePouch)
return ctx.db = new PouchDB('app.db')
})
.then(res => {