react-native-metabase-auth makes uses of React Native's AsyncStorage
to help you easily manage Metabase sessions and requests in React Native apps.
Install the package with yarn
yarn add react-native-metabase-auth
- Log in a user by asking them for the baseUrl of their Metabase instance (metabase.company.com for example), their metabase username (often their email), and their password.
- Make requests on behalf of the user using
Metabase.request('resource')
- When you're all done, use
Metabase.logout()
to destroy the session and remove it from storage.
For a more in depth look at usage, check out the usage docs
For a more complete sense of integrating Metabase auth into a React Native app, I'd recommend checking out the example app
This package should work with all Metabase instances running Metabase 0.24 or later.
While I am a Metabase team member, this package is just a side project of mine and should not be considered an official Metabase product. That being said, I hope you find it useful!