Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make JWTs a central model component of SpeziAccount #49

Open
1 task done
Supereg opened this issue Feb 20, 2024 · 1 comment
Open
1 task done

Make JWTs a central model component of SpeziAccount #49

Supereg opened this issue Feb 20, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Supereg
Copy link
Member

Supereg commented Feb 20, 2024

Problem

Currently, we only expect a AccountService to provide a stable accountId and an optional user-visible userId for all accounts. Within the Spezi ecosystem, we agreed that we want to rely on JWTs as the way-to-got for decentralized authorization. Therefore, it might make sense to make providing access to the underlying JWT data structure a mandatory requirement for Account Service implementations, such that web service implementation can rely on SpeziAccount to provide access to the JWT of any kind of account.

Solution

A simple approach would be to add a new JWT-based AccountKey implementation. Refer to the Adding new Account Values guide for more information on that.
While the web service side would still need to know what JWTs it expects, the iOS-side of things could just blindly forward the respective JWT from the AccountDetails.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct and Contributing Guidelines
@Supereg Supereg added the enhancement New feature or request label Feb 20, 2024
@PSchmiedmayer
Copy link
Member

Highly agree, that would be important and desirable 👍

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

2 participants