MCPcopy Index your code
hub / github.com/MALSync/MALSync / oauth

Function oauth

src/utils/oauth.ts:3–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1export const clientId = '10093a3f9f0174b6b5577c40e9accdae';
2
3export function oauth() {
4 $(document).ready(async function () {
5 if (window.location.href.includes('code=')) {
6 try {
7 await getRefreshToken();
8 } catch (e) {
9 console.error(e);
10 $('.card-text').first().text(`Error: ${e}`);
11 $('body').removeClass();
12 $('body').addClass('noExtension');
13 }
14 return;
15 }
16 generateUrl();
17 });
18}
19
20function generateUrl() {
21 const challenge = generateRandomString(50);

Callers 2

mainFunction · 0.90
oauth.tsFile · 0.90

Calls 3

errorMethod · 0.80
getRefreshTokenFunction · 0.70
generateUrlFunction · 0.70

Tested by

no test coverage detected