Overview:
This repository is a demo for integrating Pocketbase and SvelteKit using OAuth2 with any supported provider. It is designed to be easily customizable and requires minimal setup. By adding the OAuth provider in the admin dashboard, the integration is ready to be used without any further customization.
Features:
- Plug and play: No complex setup or customization required, simply add the OAuth provider in the admin dashboard.
- Support for any OAuth provider: Can be used with any supported OAuth provider.
- Full control over user authentication: Use OAuth2 to authenticate users and access user data.
Installation:
- Download the latest version of Pocketbase and run the executable using
./pocketbase serve. - Register an app with your OAuth provider to acquire a Client ID and Client Secret. For example, you can create a Twitch App by visiting the Twitch developer portal.
- Set the Redirect URL (if applicable) of your OAuth App to
http://localhost:5173/login. - Create an admin account on your local Pocketbase server and register your app as an OAuth provider. If you are working locally with the default Pocketbase host settings, you can access it here.
- Create a
.envfile in the root directory of the repository and populate it with the following:KEY=Value - Install the project dependencies using
pnpm install. - Start a development server using
pnpm start.
Summary:
This repository provides a demo for integrating Pocketbase and SvelteKit with OAuth2 using any supported provider. It offers a plug and play solution, requiring minimal customization. With full support for user authentication and access to user data, it provides an easy way to integrate OAuth functionality into your project.