pocketpages-starter-auth
v0.0.1
Published
A starter project for PocketPages with authentication
Downloads
20
Maintainers
Readme
MPA Auth Demo
This starter kit shows how to do Multi Page App (MPA) auth using PocketPages.
Installation
npx tiged benallfree/pocketpages/packages/starters/auth .
cd auth
npm i
pocketbase --dir=pb_data --dev serve
bunx maildevNotes
Anonymous Login
Anonymous login only works if Password login is enabled.
Password Login
Password login is enabled by default in PocketBase.
OTP Login
OTP login requires a verified email address.
Using Password Reset
Password Reset requires PocketBase's mail to be configured. The simplest localhost test is as follows:
http://localhost:3000/reset-passwordApp Configuration
This starter kit is already configured. In your own app, you'll need to update these settings
Step 1: Configure Mail Settings
In the PocketBase admin panel, navigate to Settings > Mail Settings and set the mail provider info to:
Host: localhost
Port: 1025
User: (blank)
Password: (blank)
Step 2: Update Mail Template URLs
In the PocketBase admin panel, navigate to Collections > Users > Edit > Options > Mail Templates and update the URLs as follows:
- Verification template:
{APP_URL}/auth/confirm/{TOKEN}/verification - Reset Password template:
{APP_URL}/auth/confirm/{TOKEN}/password-reset - Confirm email reset template:
{APP_URL}/auth/confirm/{TOKEN}/email-change
