Skip to content

Example app with complete server side registration and authentication flow (including OAuth), using Remix and PocketBase

License

Notifications You must be signed in to change notification settings

ausminternet/remix-pocketbase-starter

Repository files navigation

Remix + PocketBase

Example app with complete server side registration and authentication flow (including OAuth), using Remix and PocketBase. PocketBase is not exposed to the client.

Used technologies:

Demo: https://remixpb.uber.space

Usage

Install and run Pocketbase or create a hosted instance on pockethost.io and enter your pocketbase url in your .env:

POCKETBASE_URL=http://localhost:8090

Open the PocketBase admin ui and go to Settings > Application and change the Application URL to your app url (http://localhost.3000 for Example).

Go to Collections > Users > Edit Collection > Options and activate Forbid authentication for unverified users.

Then got to Settings > Mail Settings and change the following action URLs:

  • Verification: {APP_URL}/auth/confirm-verification?token={TOKEN}
  • Password reset: {APP_URL}/auth/confirm-password-reset?token={TOKEN}
  • Confirm email change: {APP_URL}/auth/confirm-email-change?token={TOKEN}

To use authentication via OAuth providers, go to Settings > Auth Providers and configure the desired providers.

Additionally you have to add the correct OAuth callback url in your .env:

OAUTH_CALLBACK_URL=http://localhost:3000/auth/oauth-callback

After you have set up your PocketBase and populated the .env file, clone this repository, install dependencies and run the remix app:

git clone https://github.com/ausminternet/remix-pocketbase-starter
pnpm install
pnpm run dev

About

Example app with complete server side registration and authentication flow (including OAuth), using Remix and PocketBase

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published