
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
pouchdb-seamless-auth
Advanced tools
Seamless switching between online (CouchDB) and offline (PouchDB) authentication.
Seamless switching between online (CouchDB) and offline (PouchDB) authentication.
WARNING: This plug-in stores password hashes in a local PouchDB. In for example internet cafes, this is not a smart thing to do. In your app, you should include a checkbox 'I trust this computer' and only use pouchdb-seamless-auth when it is checked. Otherwise, you can fall back to pouchdb-auth. This functionality might be implemented as part of the plug-in in the future.
NodeJS package name: pouchdb-seamless-auth
Browser object name: window.SeamlessAuth
This plug-in provides a convenience layer on top of the PouchDB Auth
plug-in. By default, it users a local database named _users
as
backend for its log in, log out and get session actions. But, when you
set a remote database, that local database is synced with the given
database. In other words, it allows you to let your user log in one
time using the remote database, and from that moment on you can also the
session functions while offline! Very handy when using a per-user
database set up that PouchDB syncs.
Instead of passing this plug-in to the PouchDB.plugin()
function, install
it like this:
``javascript //NodeJS require("pouchdb-seamless-auth")(PouchDB)
//Browser SeamlessAuth(PouchDB) ``
After that is finished (a promise is returned to help determine when that is),
all functions documented below are available on the PouchDB
object.
Set a remote database to be seamlessly synced to.
Parameters:
PouchDB
constructor as the first argument.PouchDB
constructor
as its second argument.Returns: a promise, which resolves to nothing when the remote database is completely set up.
A synchronous function. Undos what PouchDB.setSeamlessAuthRemoteDB()
did.
Returns: nothing.
See pouchdb-auth's db.session()
.
See pouchdb-auth's db.logIn()
.
See pouchdb-auth's db.logOut()
.
See pouchdb-auth's db.signUp()
.
Used to invalidate the cache manually.
This is a synchronous function. Because an application might call
PouchDB.seamlessSession()
a lot of times, that method is cached. For most
of the time, you don't have to worry about that, because log in, log out and
sign up all invalidate that cache, making it pretty much unnoticable. There is
one known exception: when changing the user document in _users
manually.
Call this to invalidate the cache when you do that.
Returns: nothing.
PouchDB Server and its sub-packages are distributed as a monorepo.
For a full list of packages, see the GitHub source.
The Apache 2 License. See the LICENSE file for more information.
FAQs
Seamless switching between online (CouchDB) and offline (PouchDB) authentication.
We found that pouchdb-seamless-auth demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.