stadust / pointercrate

Rewrite of the https://pointercrate.com backend in Rust
MIT License
80 stars 53 forks source link

More refactors to prepare for oauth login #172

Closed stadust closed 2 months ago

stadust commented 2 months ago

Changed my mind overnight about how to implement this. Now the type system also enforces that things like invalidate_access_tokens are correctly implemented for all auth types. Also hide the registration web form if the legacy_accounts features is disabled.

License Acceptance

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 56.03865% with 91 lines in your changes missing coverage. Please review.

Project coverage is 27.79%. Comparing base (b0c39ae) to head (dc65341). Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
pointercrate-user-pages/src/login.rs 0.00% 31 Missing :warning:
pointercrate-user/src/auth/legacy/patch.rs 0.00% 14 Missing :warning:
pointercrate-user-api/src/endpoints/auth.rs 40.00% 6 Missing :warning:
pointercrate-user/src/auth/legacy/post.rs 81.25% 6 Missing :warning:
pointercrate-user/src/auth/legacy/mod.rs 89.58% 5 Missing :warning:
pointercrate-user/src/auth/patch.rs 0.00% 5 Missing :warning:
...te-demonlist-pages/src/account/list_integration.rs 0.00% 3 Missing :warning:
pointercrate-user-api/src/auth.rs 50.00% 3 Missing :warning:
pointercrate-user-pages/src/account/mod.rs 0.00% 3 Missing :warning:
pointercrate-user/src/auth/mod.rs 90.00% 3 Missing :warning:
... and 7 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #172 +/- ## ========================================== - Coverage 27.81% 27.79% -0.02% ========================================== Files 113 116 +3 Lines 8238 8243 +5 ========================================== Hits 2291 2291 - Misses 5947 5952 +5 ```

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