Skip to content

muratGG/refine-pocketbase

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

refine-pocketbase

pb

PocketBase providers for Refine.

Features

  • auth provider
    • register
    • login with password
    • login with provider
    • forgot password
    • update password
  • data provider
    • filters
    • sorters
    • pagination
  • live provider
    • subscribe
    • unsubscribe

Installation

yarn add refine-pocketbase
# or
npm install refine-pocketbase

Basic Usage

import PocketBase from "pocketbase";
import { authProvider, dataProvider, liveProvider } from "refine-pocketbase";

const pb = new PocketBase(POCKETBASE_URL);

<Refine
  authProvider={authProvider(pb)}
  dataProvider={dataProvider(pb)}
  liveProvider={liveProvider(pb)}
  ...
>
  ...
</Refine>

Auth Provider Options

import { authProvider, AuthOptions } from "refine-pocketbase";

const authOptions: AuthOptions = {
  loginRedirectTo: "/dashboard",
};

<Refine
  authProvider={authProvider(pb, authOptions)}
  ...
>
  ...
</Refine>

Tasks: PRs Welcome!

  • happy path test specs
    • authProvider
    • dataProvider (except for deleteOne)
    • liveProvider
  • test specs for authProvider error conditions
    • register
    • forgotPassword
    • updatePassword
    • login
  • test specs for dataProvider error conditions
    • getList
    • create
    • update
    • getOne
    • deleteOne
  • test specs for deleteOne

Contribute

Buy Me A Coffee

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 89.3%
  • JavaScript 10.7%