nucypher / taco-web

๐ŸŒฎ A TypeScript client for TACo (Threshold Access Control)
https://docs.threshold.network/app-development/threshold-access-control-tac
GNU General Public License v3.0
14 stars 22 forks source link

Prevent perpetual use of expired auth signature; remove superfluous API functions #567

Closed derekpierre closed 2 weeks ago

derekpierre commented 3 weeks ago

Type of PR:

Required reviews:

What this does:

High-level idea of the changes introduced in this PR. List relevant API changes (if any), as well as related PRs and issues.

Based over #560 (somewhat of a follow-up PR).

Issues fixed/closed:

  • Fixes #...

Closes https://github.com/nucypher/taco-web/issues/324

Why it's needed:

Explain how this PR fits in the greater context of the NuCypher Network. E.g., if this PR address a nucypher/productdev issue, let reviewers know!

Notes for reviewers:

What should reviewers focus on? Is there a particular commit/function/section of your PR that requires more attention from reviewers?

netlify[bot] commented 3 weeks ago

Deploy Preview for taco-nft-demo canceled.

Name Link
Latest commit 236f2963e68ff116acf55a2c30e0bce67ebe4e0d
Latest deploy log https://app.netlify.com/sites/taco-nft-demo/deploys/66c4e6ce70156c0009928c63
netlify[bot] commented 3 weeks ago

Deploy Preview for taco-demo canceled.

Name Link
Latest commit 236f2963e68ff116acf55a2c30e0bce67ebe4e0d
Latest deploy log https://app.netlify.com/sites/taco-demo/deploys/66c4e6ceb8611e0008572d8f
codecov-commenter commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 84.61538% with 6 lines in your changes missing coverage. Please review.

Project coverage is 88.55%. Comparing base (e8f9098) to head (236f296). Report is 177 commits behind head on main.

Files Patch % Lines
...ackages/taco-auth/src/providers/eip4361/eip4361.ts 80.00% 3 Missing and 1 partial :warning:
packages/taco-auth/src/storage.ts 85.71% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #567 +/- ## =========================================== + Coverage 23.12% 88.55% +65.42% =========================================== Files 62 59 -3 Lines 10175 6098 -4077 Branches 260 300 +40 =========================================== + Hits 2353 5400 +3047 + Misses 7763 660 -7103 + Partials 59 38 -21 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

derekpierre commented 2 weeks ago

Overall looks good ๐Ÿ‘๐Ÿป While I do find this acceptable (and very convenient for implementers) it's interesting to observe the lines between application and library logic blurring a bit here.

Because we opted to cache the message ourselves to prevent users having to sign every time for proof of wallet ownership, it forces us to manage the cache appropriately - this PR does the latter. Definitely open to ideas here if you have any.