Pocketkit is a simple SvelteKit starter template to get quickly up and running with PocketBase. It has all neccessary auth features without being complicated or bloated.
Open the Pocketbase Settings and paste the following schema in "Import collections".
[
{
"id": "_pb_users_auth_",
"name": "users",
"type": "auth",
"system": false,
"schema": [
{
"id": "users_name",
"name": "name",
"type": "text",
"system": false,
"required": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
},
{
"id": "oAuthIndicator",
"name": "isOAuth",
"type": "bool",
"system": false,
"required": false,
"options": {}
}
],
"indexes": [],
"listRule": "id = @request.auth.id",
"viewRule": "id = @request.auth.id",
"createRule": "",
"updateRule": "id = @request.auth.id",
"deleteRule": "id = @request.auth.id",
"options": {
"allowEmailAuth": true,
"allowOAuth2Auth": true,
"allowUsernameAuth": true,
"exceptEmailDomains": null,
"manageRule": null,
"minPasswordLength": 8,
"onlyEmailDomains": null,
"requireEmail": false
}
}
]
PUBLIC_POCKETBASE="http://127.0.0.1:8090"
Pocketkit is ready for OAuth2. Simply configure the OAuth Providers you want to use in the PocketBase Dashboard and it will show up in the Login UI.