MCPcopy
hub / github.com/TransformerOptimus/SuperAGI / signInUser

Function signInUser

gui/pages/_app.js:203–217  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

201 };
202
203 async function signInUser() {
204 let github_client_id = githubClientId();
205
206 // If `github_client_id` does not exist, make the API call
207 if (!github_client_id) {
208 const response = await getGithubClientId();
209 github_client_id = response.data.github_client_id;
210 }
211 if(!github_client_id) {
212 console.error('Error fetching github client id make sure to set it in the config file');
213 }
214 else {
215 window.open(`https://github.com/login/oauth/authorize?scope=user:email&client_id=${github_client_id}`, '_self')
216 }
217 }
218
219 const handleLocalEnviroment = () => {
220 const userData = {

Callers

nothing calls this directly

Calls 3

githubClientIdFunction · 0.90
getGithubClientIdFunction · 0.90
errorMethod · 0.80

Tested by

no test coverage detected