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

Save email verification token to person's pod #5

Merged
merged 3 commits into from
Jan 17, 2024
Merged

Conversation

mrkvon
Copy link
Member

@mrkvon mrkvon commented Jan 17, 2024

To do this, person has to prepare their pod by creating a settings file that notification service identity has write or append access to. The service also needs read access to every file that participates in the discovery, in particular personal hospex profile.

The settings are discovered as follows:

  1. we start with person's webId
  2. we fetch (extended) profile and find public type index
  3. in public type index, we find resources that are relevant in this particular context (e.g. personal hospex document in case of sleepy.bike)
  4. in these resources, we find settings by searching triple <webId> space:preferencesFile <settings> .
    • to write verification token, we pick the settings which notification service identity has access to, using WAC-Allow header
    • to read verification token, we look for triple <webId> <https://example.com/emailVerificationToken> "token" .
      the predicate for token discovery is editable in config, but should be kept consistent

When automatic save fails, we still want to allow user to save the token manually.
We didn't write tests for this (maybe TODO later)
@mrkvon mrkvon merged commit 106e3d3 into main Jan 17, 2024
4 checks passed
@mrkvon mrkvon deleted the save-jwt-to-pod branch January 17, 2024 22:41
mrkvon added a commit that referenced this pull request Jan 17, 2024
Before GET /verify-email, person must create a settings file
that this service can discover and write to.
This can be done automatically via app, e.g. sleepy.bike
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

Successfully merging this pull request may close these issues.

1 participant