MCPcopy Create free account
hub / github.com/bugy/script-server / onLoad

Function onLoad

web-src/src/login/login.js:37–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35}
36
37function onLoad() {
38 axiosInstance.get('auth/config').then(({data: config}) => {
39 const loginContainer = document.getElementById('login-content-container');
40
41 if (config['type'] === 'google_oauth') {
42 setupGoogleOAuth(loginContainer, config);
43 } else if (config['type'] === 'keycloak_openid') {
44 setupKeycloakOpenid(loginContainer, config);
45 } else if (config['type'] === 'gitlab') {
46 setupGitlabOAuth(loginContainer, config);
47 } else {
48 setupCredentials(loginContainer);
49 }
50
51 const redirectError = checkRedirectReason()
52 if (redirectError) {
53 showError(redirectError)
54 }
55 })
56}
57
58function setupCredentials(loginContainer) {
59 var credentialsTemplate = createTemplateElement('login-credentials-template');

Callers

nothing calls this directly

Calls 7

setupGoogleOAuthFunction · 0.85
setupKeycloakOpenidFunction · 0.85
setupGitlabOAuthFunction · 0.85
setupCredentialsFunction · 0.85
checkRedirectReasonFunction · 0.85
showErrorFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected