Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Using api without sending passphrase #10

Closed
fix opened this issue Mar 22, 2016 · 1 comment
Closed

Using api without sending passphrase #10

fix opened this issue Mar 22, 2016 · 1 comment

Comments

@fix
Copy link
Contributor

fix commented Mar 22, 2016

In order to prevent from sending passphrase through the API, on opening an account, it should be done the following way.

  1. user request opening an account sending publicKey (/api/account/open?publicKey=...)
  2. server create a random token, encrypt it with publicKey and send it back
  3. user decrypt it with private key and send the token back to server (/api/account/open?publicKey=...&token=...
  4. server compare both tokens. If equals, the user is auth.

Ideally the IP should be matched, and token invalidated if IP change or after some time.

as for creating transactions, it should be clear in the doc that the API cannot be used safely, but lisk-js instead.

@fix
Copy link
Contributor Author

fix commented Aug 30, 2016

closing it as duplicate of #39

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants