-
Notifications
You must be signed in to change notification settings - Fork 1
auth pocketbase HowTo
GitHub Action edited this page May 21, 2026
·
1 revision
This guide demonstrates how to configure and use the PocketBase Authentication adapter for Quatrain Core.
To test authentication locally, you will need to run a local instance of PocketBase.
- Go to the PocketBase download page and download the prebuilt binary for your OS.
- Extract the archive.
- Open a terminal in the extracted directory and start the server:
./pocketbase serve
- Access the Admin UI at
http://127.0.0.1:8090/_/and create your first admin account. - In the Admin UI, go to Collections > users, click the Settings icon (gear) for the users collection, and ensure that Options > Allow email auth is enabled.
Configure the adapter once during application startup.
import { Auth } from '@quatrain/auth'
import { PocketBaseAuthAdapter } from '@quatrain/auth-pocketbase'
const authAdapter = new PocketBaseAuthAdapter({
config: {
url: 'http://127.0.0.1:8090'
}
})
// Register as the default auth provider
Auth.addAdapter(authAdapter, 'default', true)The PocketBaseAuthAdapter integrates seamlessly with Quatrain's standard Auth API.
When calling Auth.getProvider().signup(), it connects directly to your PocketBase instance to authenticate users.