foal icon indicating copy to clipboard operation
foal copied to clipboard

Add `userIdType` option to `@JWT` and `@UseSessions` and remove `fetchUser` interface and functions

Open LoicPoullain opened this issue 2 years ago • 1 comments

Issue

See #1120

Solution and steps

  • [x] Add userIdType option and change the interface of UseSessions.
  • [x] Add userIdType option and change the interface of JWTxxx.
  • [x] Remove the FetchUser interface and the fetchUser functions.

Checklist

  • [ ] Add/update/check docs (code comments and docs/ folder).
  • [x] Add/update/check tests.
  • [x] Update/check the cli generators.

LoicPoullain avatar Aug 01 '22 15:08 LoicPoullain

Codecov Report

Merging #1119 (f912ba5) into v3-0-0 (a16759e) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           v3-0-0    #1119   +/-   ##
=======================================
  Coverage   98.82%   98.83%           
=======================================
  Files          85       86    +1     
  Lines        1705     1719   +14     
  Branches      408      413    +5     
=======================================
+ Hits         1685     1699   +14     
  Misses         20       20           
Impacted Files Coverage Δ
packages/core/src/index.ts 0.00% <ø> (ø)
...kages/core/src/sessions/http/check-user-id-type.ts 100.00% <100.00%> (ø)
...e/src/sessions/http/get-session-id-from-request.ts 100.00% <100.00%> (ø)
packages/core/src/sessions/use-sessions.hook.ts 98.82% <100.00%> (+0.02%) :arrow_up:
packages/core/src/core/config/config.ts 94.28% <0.00%> (+0.05%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a16759e...f912ba5. Read the comment docs.

codecov-commenter avatar Aug 01 '22 16:08 codecov-commenter