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

Function matchAuth

src/background/sync/dropbox.js:158–169  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

156 });
157 },
158 matchAuth(url) {
159 const redirectUri = `${config.redirect_uri}?`;
160 if (!url.startsWith(redirectUri)) return;
161 const query = loadQuery(url.slice(redirectUri.length));
162 const { state, codeVerifier } = this.session || {};
163 this.session = null;
164 if (query.state !== state || !query.code) return;
165 return {
166 code: query.code,
167 code_verifier: codeVerifier,
168 };
169 },
170 async finishAuth(payload) {
171 await this.authorized({
172 code: payload.code,

Callers

nothing calls this directly

Calls 1

loadQueryFunction · 0.90

Tested by

no test coverage detected