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

Experiment: use JWT action token to implement the feature of 'send token by email adress' #457

Open
dadiorchen opened this issue Mar 25, 2024 · 4 comments · May be fixed by #462
Open

Experiment: use JWT action token to implement the feature of 'send token by email adress' #457

dadiorchen opened this issue Mar 25, 2024 · 4 comments · May be fixed by #462
Labels

Comments

@dadiorchen
Copy link
Collaborator

dadiorchen commented Mar 25, 2024

As proposed in this picture below, we want to use wallet API to issue Action Token and send token to an account that will be registered in the future. So in this issue, we will implement a integration test that covers:

  1. An endpoint to issue a JWT token with the content shown on the picture: the example action token.
  2. An endpoint to receive this action token and verify the token then do wallet transfer.
  3. The edge case that action token is expired, the request is denied.

Send_token_by_email drawio

In details, the integration tests are:

  1. A test: a wallet account that owns tokens, the account issue a Action Token, simulates a new user coming in and create new wallet account, then apply the token that specified in the action token, wallet API verify the action token, if okay, then do the transfer, if not, deny it.
  2. Based on the test story above, simulate the token expiration, at this case, the token application is denied.

Reference reading:

@sebastiangaertner
Copy link
Contributor

Thank Dadio, it looks good. jwt is an open standard so that ticks the main box.

A question regarding the 7 day expire case. Is the wallet at that point created already and the tokens transfered? If so how can the user retrieve that data?

@dadiorchen
Copy link
Collaborator Author

The wallet is not created till the new user receive and click the link to register, so nothing happen before that, that’s a intention of transfer stored in the action token, it will be executed when new user coming in and login into wallet app, so this solution has possibility that the promised token can not be transfer because the change by the owner side, so solve this problem would bring huge complex and workload to system, it don’t worth the price at this stage, we can add it in the future.

@sebastiangaertner
Copy link
Contributor

ok. So we would need to block those tokens to be in transfer, right? So thats "pending" state or?

@dadiorchen
Copy link
Collaborator Author

In this first version we don’t do that, because it bring much more work into the project, we simply give the responsibility to the owner to take care it, when it release and we get feedback on this feature, we can start to consider an complete mechanism on this.

@paramkr2 paramkr2 linked a pull request Apr 11, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants