Expand description
Helpers for requesting OAuth2 tokens.
OAuth2 has a few possible ways to authenticate, and the right choice depends on how your app operates and is deployed.
For an overview, see the Dropbox OAuth Guide.
For quick recommendations based on the type of app you have, see the OAuth types summary.
Structs§
- Authorization
- Provides for continuing authorization of the app.
- Authorize
UrlBuilder - Builds a URL that can be given to the user to visit to have Dropbox authorize your app.
- Pkce
Code - A proof key for OAuth2 PKCE (“Proof Key for Code Exchange”) flow.
- Token
Cache TokenCache
provides the current OAuth2 token and a means to refresh it in a thread-safe way.
Enums§
- Oauth2
Type - Which type of OAuth2 flow to use.
- Token
Type - What type of access token is requested? If unsure, ShortLivedAndRefresh is probably what you want.
Functions§
- get_
auth_ from_ env_ or_ prompt - Get an
Authorization
instance from environment variablesDBX_CLIENT_ID
andDBX_OAUTH
(containing a refresh token) orDBX_OAUTH_TOKEN
(containing a legacy long-lived token).