Code does not check for session = null when obtaining webId
Open
Nobody has claimed this yet.
authentication
input-needed
- Dominant language
- TypeScript
- Stars
- 153
- Forks
- 46
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 7
Description
How to reproduce
- Logged out and cleared localStorage
- Attempted to login to https://melvin.solid.live/public/RWWCrew/
- 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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/signin.js around the signInPopUpButton handler near line 739, then compare its session handling with webIdFromSession near line 783. Reproduce the logged-out custom-domain login flow and verify that a null session no longer causes the reported webId TypeError and that the expected provider login and bearer-token flow can proceed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- authentication, frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100