Open Ekhorn opened 1 year ago
For protected resource access, it will likely make most sense to use the following.
OAuth2.0
The token should be stored in a service worker, to mitigate the severity of XSS and intercept requests with a token. This needs to be tested how reliable it is and whether this works with Tauri. The architecture style would likely be a token-mediating backend.
The following resource was used to come to these conclusions: https://datatracker.ietf.org/doc/html/draft-ietf-oauth-browser-based-apps
The UI would use probably use some form of silent authentication, with a simple dialog to handle authentication.
Also, a CSP should be looked at to minimize attack vectors for XSS https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP.
Todo
Description
As a user, I want to be able to register an account, so that I can log in to Spaced.
Acceptance criteria