Skip to main content

MongoDB Adapter

Install

pip install 'nexfetch-auth[mongodb]'

Usage

from nexfetch_auth.db.adapters.mongodb import mongodb_adapter

db = await mongodb_adapter("mongodb://localhost:27017", "myapp")
auth = await nexfetch_auth(secret="...", database=db)

Collections and indexes are created automatically.