android-components / mozilla.components.service.fxa / FirefoxAccount / getCachedOAuthToken

# getCachedOAuthToken

`fun getCachedOAuthToken(scopes: Array<String>): Deferred<OAuthInfo?>` (source)

Tries to fetch a cached access token for the given scope.

If the token is close to expiration, we may refresh it.

### Parameters

`scopes` - List of OAuth scopes for which the client wants access

Return
OAuthInfo that stores the token, along with its scopes and keys when complete