How to use the solid-auth-client.popupLogin function in solid-auth-client

To help you get started, we’ve selected a few solid-auth-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github solid / solid-ui / src / authn / authn.ts View on Github external
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) {
github linkeddata / dokieli / src / auth.js View on Github external
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)
              }
github solid / react-components / src / components / LoginButton.jsx View on Github external
    onClick={() => auth.popupLogin({ popupUri: popup })}>{children};
}
github Eximua / solid-ipfs / src / solid-file-client.js View on Github external
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) {

solid-auth-client

Opaquely authenticates solid clients

MIT
Latest version published 3 years ago

Package Health Score

52 / 100
Full package analysis

Similar packages