Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
signInPopUpButton.addEventListener('click', () => {
const offline = offlineTestID()
if (offline) return setUserCallback(offline.uri)
return solidAuthClient.popupLogin().then(session => {
const webIdURI = session.webId
// setUserCallback(webIdURI)
const divs = dom.getElementsByClassName(magicClassName)
console.log(`Logged in, ${divs.length} panels to be serviced`)
// At the same time, satisfy all the other login boxes
for (let i = 0; i < divs.length; i++) {
const div: any = divs[i]
// @@ TODO Remove the need to manipulate HTML elements
if (div.setUserCallback) {
try {
div.setUserCallback(webIdURI)
const parent = div.parentNode
if (parent) {
parent.removeChild(div)
}
} catch (e) {
function submitSignInOIDC (url) {
var userIdentityInput = document.getElementById('user-identity-input')
var popupUri = Config.OidcPopupUrl;
if (solidAuth) {
solidAuth
.popupLogin({ popupUri })
.then((session) => {
if (session && session.webId) {
console.log("Connected:", session.webId);
setUserInfo(session.webId, true)
.then(() => {
var uI = document.getElementById('user-info')
if (uI) {
util.removeChildren(uI);
uI.insertAdjacentHTML('beforeend', getUserSignedInHTML());
}
if (userIdentityInput) {
userIdentityInput.parentNode.removeChild(userIdentityInput)
}
onClick={() => auth.popupLogin({ popupUri: popup })}>{children};
}
popupLogin: async function() {
let session = await solid.currentSession();
let popupUri = 'https://solid.community/common/popup.html';
if (!session)
session = await solid.popupLogin({ popupUri });
return(session.webId);
},
login: async function(idp) {