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

Discussion: Using Dotlicense for Subscription SaaS / Web Apps #2

Open
cryppadotta opened this issue Mar 6, 2018 · 1 comment
Open

Comments

@cryppadotta
Copy link
Owner

I think Dotlicense could be used in a web context for SaaS apps. If you used a Metamask/signing-based login then you could use that proof of ownership to verify an active subscription.

For example, see meta-auth for a Metamask-based login with Node middleware. (Note: I haven't tried meta-auth and I can't vouch for it's security, but I think it's an interesting idea.)

This could work with Dotlicense like this:

  1. The user has paid for a subscription-token on-chain
  2. For a user to log in they sign a challenge, proving they own the given address (and the webserver sets a cookie so that this only has to be done as often as you would log in normally)
  3. The webserver now knows the identity of the user, as well as the user's ETH address. This means the webserver can check on-chain if the user's subscription is valid and unlock features accordingly.

As of writing, I haven't built any of the supporting Web UI libraries nor the Node middleware, but once we have Dotlicense working, it should be straightforward to do this.

@nickoneill
Copy link

I'm pretty confident in this direction. As I outlined the other day in telegram, this uses eth-sig-util to do ecrecover on the signature to get the public key -> address. https://github.com/MetaMask/eth-sig-util/blob/master/index.js#L102

Repository owner deleted a comment from katsavav Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@nickoneill @cryppadotta and others