Skip to content

Code does not check for session = null when obtaining webId #32

Open
@melvincarvalho

Description

@melvincarvalho

How to reproduce

  1. Logged out and cleared localStorage
  2. Attempted to login to https://melvin.solid.live/public/RWWCrew/
  3. Click on custom domain, https://melvincarvalho.com/#me

Observed behaviour

Uncaught (in promise) TypeError: Cannot read property 'webId' of null
    at signin.js:732
    at <anonymous>

in

  signInPopUpButton.addEventListener('click', function () {
    var offline = offlineTestID();
    if (offline) return setUserCallback(offline.uri);
    return solidAuthClient.popupLogin({ popupUri: $SOLID_GLOBAL_config.popupUri }).then(function (session) {
      var webIdURI = session.webId;

Expected Behaviour

What I would expect is to redirect me to my oidc provider, let me log in, and then give me a bearer token

Possible fix

https://github.com/solid/solid-ui/blob/master/src/signin.js#L739 should use webIdFromSession

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions