Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

User authentication (with backend verification) #17

Closed
onbjerg opened this issue Aug 8, 2019 · 2 comments
Closed

User authentication (with backend verification) #17

onbjerg opened this issue Aug 8, 2019 · 2 comments
Assignees
Labels
discussion This issue needs to be fleshed out enhancement New feature or request
Milestone

Comments

@onbjerg
Copy link
Contributor

onbjerg commented Aug 8, 2019

Make it possible to sign in to Apiary using Web3. Signing in gives you the ability to persist your subscriptions across sessions.

I imagine the flow to be something like:

  • Click "Sign in"
  • A TOTP is sent from the server to the client
  • The client signs the TOTP using Web3
  • The signed TOTP is sent back to the server and verified
  • A token is sent to the client that can be used for the remainder of the session

Another approach would be to possibly use the signed TOTP directly as the token.

If there are any other approaches I've missed then I'd like to hear them 👇

@onbjerg onbjerg added enhancement New feature or request discussion This issue needs to be fleshed out labels Aug 8, 2019
@onbjerg onbjerg added this to the 1.3.0 milestone Aug 8, 2019
@onbjerg onbjerg added this to Backlog in Experience via automation Aug 8, 2019
@onbjerg onbjerg added this to Backlog in API via automation Aug 8, 2019
@onbjerg
Copy link
Contributor Author

onbjerg commented Aug 12, 2019

Another approach:

  • Users are stored in the database with their public address and a random nonce
  • Upon authentication users fetch their nonce
    • New users are created and a nonce is returned
    • Existing users just fetch their nonce
  • The nonce is signed and sent back to the server in exchange for a session token
  • The nonce is set to a new random number for next time

Pros:

  • Easier to manage than TOTPs
  • Simple design, technically and for the end-user

Cons:

  • Theoretically possible that a user's nonce is set to the same number as a spent nonce at some point (can be mitigated)

@onbjerg onbjerg moved this from Backlog to In Progress in API Aug 28, 2019
@onbjerg onbjerg moved this from Backlog to In Progress in Experience Aug 28, 2019
@onbjerg onbjerg self-assigned this Aug 28, 2019
@onbjerg onbjerg moved this from In Progress to Backlog in Experience Sep 12, 2019
@onbjerg onbjerg moved this from In Progress to Backlog in API Sep 12, 2019
@onbjerg onbjerg modified the milestones: 2.1.0, 2.2.0 Nov 30, 2019
@sembrestels sembrestels added this to Backlog in CFDAO Vote #18 Jan 29, 2020
@onbjerg onbjerg changed the title User authentication User authentication (with backend verification) Feb 12, 2020
@onbjerg
Copy link
Contributor Author

onbjerg commented Jul 28, 2020

Sort of already implemented and we can extend it if needed.

@onbjerg onbjerg closed this as completed Jul 28, 2020
Experience automation moved this from Backlog to Done Jul 28, 2020
API automation moved this from Backlog to Done Jul 28, 2020
CFDAO Vote #18 automation moved this from Backlog to Done Jul 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
discussion This issue needs to be fleshed out enhancement New feature or request
Projects
API
  
Done
Experience
  
Done
Development

No branches or pull requests

1 participant