DropboxProviderOptions class
Configuration for the Dropbox OAuth provider.
Callback URL
https://example.com/auth/callback/dropbox
Usage
import 'package:server_auth/server_auth.dart';
import 'package:server_auth/server_auth.dart';
final manager = AuthManager(
AuthOptions(
store: InMemoryAuthStore(),
storeMode: AuthStoreMode.ephemeral,
providers: [
dropboxProvider(
DropboxProviderOptions(
clientId: env('DROPBOX_CLIENT_ID'),
clientSecret: env('DROPBOX_CLIENT_SECRET'),
redirectUri: 'https://example.com/auth/callback/dropbox',
),
),
],
),
);
Notes
- Uses OAuth 2.0.
- Set
tokenAccessType: 'offline'to receive refresh tokens. - The userinfo endpoint requires a POST request with no body.
Constructors
-
DropboxProviderOptions({required String clientId, required String clientSecret, required String redirectUri, List<
String> scopes = const ['account_info.read'], String? tokenAccessType = 'offline'}) -
Creates a new DropboxProviderOptions configuration.
const
Properties
- clientId → String
-
OAuth 2.0 app key from the Dropbox App Console.
final
- clientSecret → String
-
OAuth 2.0 app secret from the Dropbox App Console.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- redirectUri → String
-
The URI to redirect to after authentication.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scopes
→ List<
String> -
OAuth scopes to request. Defaults to
['account_info.read'].final - tokenAccessType → String?
-
Token access type. Set to 'offline' for refresh tokens.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited