npm add @openmobilehub/auth-dropbox
:::info[Prerequisites]
Each plugin requires you to follow the iOS and Android configuration prior to interacting with it.
:::
To access Google APIs, please follow these steps in order to obtain the Client ID:
- Create a new app in Dropbox Console.
- Specify
<YOUR_APPLICATION_ID>://oauth
as your redirect URL for your app. - Enable the
sharing.read
permission for your app.
Add a new entry to your android/local.properties file:
DROPBOX_CLIENT_ID=<YOUR_DROPBOX_APP_KEY>
Before interacting with Dropbox, initialization of the Dropbox Auth Client is necessary, requiring platform specific configuration to be set.
import DropboxAuthClient from '@openmobilehub/auth-dropbox';
await DropboxAuth.initialize({
android: {
scopes: ['account_info.read', 'sharing.read'],
},
ios: {
scopes: ['account_info.read', 'sharing.read'],
clientId: '<YOUR_DROPBOX_APP_KEY>',
clientSecret: '<YOUR_DROPBOX_APP_SECRET>',
redirectUrl: '<YOUR_REDIRECT_URL>',
},
});
Interacting with the Dropbox provider follows the same pattern as other providers since they all implement the IAuthModule
interface. For a comprehensive list of available methods, refer to the Quick Start guide.
- See LICENSE