MCPcopy Create free account
hub / github.com/violentmonkey/violentmonkey / authorize

Function authorize

src/background/sync/dropbox.js:123–138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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',

Callers

nothing calls this directly

Calls 5

getUniqIdFunction · 0.90
getCodeVerifierFunction · 0.90
getCodeChallengeFunction · 0.90
dumpQueryFunction · 0.90
openAuthPageFunction · 0.90

Tested by

no test coverage detected