MCPcopy Create free account
hub / github.com/UI5/webcomponents / fetchAuthUrl

Function fetchAuthUrl

packages/website/src/components/Editor/githubAPI.js:7–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5const NETLIFY_BASE_URL = "https://ui5-webc-playground-server.netlify.app/.netlify/functions";
6
7export const fetchAuthUrl = async () => {
8 const response = await fetch(`${NETLIFY_BASE_URL}/github-auth-url`, {
9 method: "GET",
10 headers: {
11 "Content-Type": "application/json"
12 }
13 });
14
15 if (!response.ok) {
16 throw new Error(`failed to get oauth url: ${response.status}`);
17 }
18
19 return response.json();
20};
21
22export const exchangeCodeForToken = async (code, state) => {
23 const response = await fetch(`${NETLIFY_BASE_URL}/github-token`, {

Callers 1

authFunction · 0.90

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…