GoogleDriveOAuthInternetAccount
Auto-generated from the @jbrowse/mobx-state-tree model in the source. See the developer guide for concepts. Provided by the authentication plugin. View source.
Fetches a file from a Google Drive share link through the Drive API, with an OAuth 2.0 token from the Google login.
The configuration slots for this model are documented on its config schema page.
Each section ends with the members a composed model contributes, linked to the page that documents them.
Properties
| Member | Description |
|---|---|
type"GoogleDriveOAuthInternetAccount" |
Always "GoogleDriveOAuthInternetAccount", the name a snapshot selects this model by. |
configurationGoogleDriveOAuthInternetAccountConfig |
The config node this model reads its settings from, through getConf. Its slots are documented on its config schema page. |
Getters
| Member | Description |
|---|---|
googleDriveConfGoogleDriveOAuthInternetAccountConfig |
|
apiKeystring |
|
appIdstring |
|
browseLabel"Browse Google Drive" | undefined |
Offered on the web only, and only once the Picker's API key and project number are configured |
toggleContentsElement |
The FileSelector icon for Google drive |
selectorLabelstring |
9 inherited getters from one model
From OAuthInternetAccount: conf, authEndpoint, tokenEndpoint, needsPKCE, clientId, scopes, responseType, refreshTokenKey, authFlowParams
Methods
| Member | Description |
|---|---|
| getFetcher |
|
openLocation(location: UriLocation) => GoogleDriveFile |
1 inherited method from one model
Actions
| Member | Description |
|---|---|
validateToken(token: string, location: UriLocation) => Promise<string> |
|
chooseLocation() => Promise<UriLocation | undefined> |
The Drive link has the file's name as its last segment so the add-track form can guess the adapter from the extension; the fetcher reads only the id |
8 inherited actions from one model
From OAuthInternetAccount: storeRefreshToken, removeRefreshToken, postTokenGrant, , exchangeRefreshForAccessToken, validateTokenWithProbe, getTokenViaAuthFlow, getTokenFromUser