Using the @basictech/expo library with your React Native project
src/schema.ts
):
BasicProvider
:
app.json
sets the correct URI scheme under expo.scheme
for authentication callbacks.
useBasic
hook from @basictech/expo
inside your components to access authentication state and database client:
user
: The authenticated user or null.login()
: Starts the OAuth login flow.signout()
: Logs the user out, clearing all tokens.db
: The main database client.isLoading
: True during authentication state checks.isSignedIn
: Whether a user is authenticated.