cal.pub0.org/packages/features/auth/lib
Lucas Smith e5eb7c3906
perf: use getSlimServerSession for session retrieval (#8308)
* perf: use getSlimServerSession for session retrieval

Creates a new `getSlimServerSession` method and replaces all calls to `getServerSession`.

The new method is much faster than `getServerSession` with it not requiring the NextAuth options object which includes a number of additional packages.

Additionally introduces a primitive in-memory cache for slim sessions.

* fix: account for seconds in token.exp

* Reverts diffs

* Replaces getServerSession with slimmer version

* Update disable.ts

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
Co-authored-by: zomars <zomars@me.com>
2023-04-17 23:48:00 +00:00
..
ErrorCode.ts feat(web): improve session retrieval performance (#7584) 2023-03-10 23:45:24 +00:00
ensureSession.ts feat(web): improve session retrieval performance (#7584) 2023-03-10 23:45:24 +00:00
getServerSession.ts perf: use getSlimServerSession for session retrieval (#8308) 2023-04-17 23:48:00 +00:00
getSession.ts feat(web): improve session retrieval performance (#7584) 2023-03-10 23:45:24 +00:00
hashPassword.ts feat(web): improve session retrieval performance (#7584) 2023-03-10 23:45:24 +00:00
identityProviderNameMap.ts feat(web): improve session retrieval performance (#7584) 2023-03-10 23:45:24 +00:00
isPasswordValid.ts feat(web): improve session retrieval performance (#7584) 2023-03-10 23:45:24 +00:00
next-auth-custom-adapter.ts feat(web): improve session retrieval performance (#7584) 2023-03-10 23:45:24 +00:00
next-auth-options.ts perf: use getSlimServerSession for session retrieval (#8308) 2023-04-17 23:48:00 +00:00
sendVerificationRequest.ts Move some dependencies into async (#8270) 2023-04-14 14:25:15 -07:00
signJwt.ts Move some dependencies into async (#8270) 2023-04-14 14:25:15 -07:00
validPassword.ts feat(web): improve session retrieval performance (#7584) 2023-03-10 23:45:24 +00:00
verifyPassword.ts feat(web): improve session retrieval performance (#7584) 2023-03-10 23:45:24 +00:00