()
| 121 | }).then(normalize); |
| 122 | }, |
| 123 | async authorize() { |
| 124 | this.session = { |
| 125 | state: getUniqId(), |
| 126 | codeVerifier: getCodeVerifier(), |
| 127 | }; |
| 128 | const params = { |
| 129 | response_type: 'code', |
| 130 | token_access_type: 'offline', |
| 131 | client_id: config.client_id, |
| 132 | redirect_uri: config.redirect_uri, |
| 133 | state: this.session.state, |
| 134 | ...(await getCodeChallenge(this.session.codeVerifier)), |
| 135 | }; |
| 136 | const url = `https://www.dropbox.com/oauth2/authorize?${dumpQuery(params)}`; |
| 137 | openAuthPage(url, config.redirect_uri); |
| 138 | }, |
| 139 | async authorized(params) { |
| 140 | const data = await this.loadData({ |
| 141 | method: 'POST', |
nothing calls this directly
no test coverage detected