inrupt / inrupt/solid-client-authn-js

Why do we have a separate ISessionInfo object?

Open
#567 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
TypeScript
Stars
77
Forks
49
Avg merge
18h 20m
Merged PRs (30d)
32

Description

When reading the docs, I saw a weird

session.info.isLoggedIn

What's the rationale for having this ghost object, instead of:

  • session.isLoggedIn?
  • session.webId?
  • session.sessionId?

The notion of info objects is not something I see in interfaces; I think it may point to a design flaw.

I also want to point out that, even if there is some need for such an info object (read-only session, maybe?), that one does not exclude the other. We could perfectly have session.isLoggedIn and other.isLoggedIn. The session.info.isLoggedIn just reads like a flaw.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the documentation examples using session.info.isLoggedIn and inspect the ISessionInfo and session interfaces referenced by the issue. Compare the existing API rationale with the proposed session properties; done means reaching an agreed design and documenting or implementing the resulting API change.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.