MCPcopy Create free account
hub / github.com/QasimWani/LeetHub / parseAccessCode

Function parseAccessCode

scripts/authorize.js:27–36  ·  view source on GitHub ↗

* Parses Access Code * * @param url The url containing the access code.

(url)

Source from the content-addressed store, hash-verified

25 * @param url The url containing the access code.
26 */
27 parseAccessCode(url) {
28 if (url.match(/\?error=(.+)/)) {
29 chrome.tabs.getCurrent(function (tab) {
30 chrome.tabs.remove(tab.id, function () {});
31 });
32 } else {
33 // eslint-disable-next-line
34 this.requestToken(url.match(/\?code=([\w\/\-]+)/)[1]);
35 }
36 },
37
38 /**
39 * Request Token

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected