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

getSessions() is missing #19

Open
WhyINeedToFillUsername opened this issue Jan 25, 2021 · 1 comment
Open

getSessions() is missing #19

WhyINeedToFillUsername opened this issue Jan 25, 2021 · 1 comment

Comments

@WhyINeedToFillUsername
Copy link

Describe the bug
According to the readme at https://github.com/solid/solid-auth-fetcher/blob/master/README.md#logging-in-multiple-users, there should be getSessions() method. However, after using the library from npm, there is no exported member, nor implementation of the getSessions() method.

To Reproduce
Steps to reproduce the behavior:

  1. npm install solid-auth-fetcher
  2. import { getSessions } from 'solid-auth-fetcher'
  3. no exported member getSessions

Expected behavior
getSessions implemented as promoted :)

Additional context
latest build - 1.3.5

@josephguillaume
Copy link

The core functionality for multiple users in this example is uniqueLogin, which itself is just a wrapper around loginHelper that doesn't specify a localUserId. getSessions is just used to check if the webid is already logged in (but looks like there's a typo in the example anyway).
If I understand correctly, storage is always by localUserId, so there is currently no storage that getSessions could iterate through sessions created by uniqueLogin.
Unless I've misunderstood something, I therefore suggest simply deleting this part of the README.md.

This issue could be left open as a getSessions function could still be written that iterates through data stored for different localUserIds, but it wouldn't be used with uniqueLogin specifically.
A localUserId could also also be generated when missing, perhaps in setForUser, but this requires more thought.

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