Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot log in? #1

Open
michielbdejong opened this issue Nov 5, 2019 · 1 comment
Open

Cannot log in? #1

michielbdejong opened this issue Nov 5, 2019 · 1 comment

Comments

@michielbdejong
Copy link

Hi, great that you're building a Solid app!

I tried to click 'Login' on http://webize.github.io/2048/ but got an alert saying [object Object], any idea what might be causing that?

@melvincarvalho
Copy link
Contributor

function dologin() {

                Solid.auth.login(authEndpoint).then(function(webid){
                  // authentication succeeded; do something with the WebID string
                  alert('Success!  You are logged in as : ' + webid);
                  localStorage.setItem('user', webid);

                  Solid.identity.getProfile(webid).then(function (parsedProfile) {
                    console.log('getProfile result: %o', parsedProfile)
                    console.log('Account storage root: %s', parsedProfile.externalResources.storage) // array of URIs })
                    storage = parsedProfile.externalResources.storage[0];
                    console.log(storage);

                  });

                  window.user = webid;
                }).catch(function(err) {
                  // authentication failed; display some error message
                  alert(err);
                });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants