Releases: CrawlerCode/payload-authjs
Releases Β· CrawlerCode/payload-authjs
v0.8.1
v0.8.0
0.8.0 (2025-04-06)
π Features
- Add custom account row label component (89ce1a7)
- Add support for other auth strategies (2c94c40)
- getPayloadSession: Cache getPayloadSession function (ff3b25b)
π©Ή Fixes
- Merge remaining properties for fields with subfield (cfa143d)
- Execute afterLogout hooks at logout endpoint (#16)
- Extend PayloadSession with collection and strategy (4ca2cdf)
- Fix mergeFields function for tabs fields (bdb393c)
- Refresh authjs session cookie at payload "refresh-token" endpoint (66e50fc)
- Revalidate payload-session tag on logout and refresh (25d4b8d)
- Move from tsc to swc to be compatible with turbopack (#18)
- AuthjsAuthStrategy: Respect auth.depth option of users collection (c06262b)
- PayloadSessionProvider: Abort fetch session on unmount (0a5e859)
- getPayloadSession: Preferably extract strategy from user._strategy & improved types (4b66142)
π₯ Performance
- PayloadAdapter: Only retrieve necessary fields (6beebd2)
π Documentation
π‘ Chore
- deps: Update npm dependencies (d269d92)
- deps: Update npm dependencies (d98f3aa)
- deps: Update npm dependencies (7e6a164)
- deps: Set minimal required payload version to 3.16.0 (because export of headersWithCors) (b76df1a)
- dev: Improve edge compatibility and some other small changes (d5e5d9e)
- dev: Add token rotation for keycloak provider & sync account expires date with session expires (27ee17b)
- dev: Add mongoose adapter (b6c4e23)
- nx: Add examples type to changelog (5e9b181)
π Examples
v0.7.1
v0.7.0
0.7.0 (2025-02-09)
π Features
- Allow custom tabs field in users collection (#14)
- Add getPayloadSession & usePayloadSession (146eebe)
- AuthjsAuthStrategy: Log a warning if user not found in the database but has an valid authjs session (1999a20)
- PayloadAdapter: Added payload logger and log debug messages (957f589)
π©Ή Fixes
- Override payload refresh operation & fix session expiration (#12)
π Documentation
- Add "Getting the payload session" section & improved some other wordings (f911249)
π‘ Chore
- Fix eslint & typescript errors (d9c5895)
- dev: Change nextjs port to 5000 (0115f0e)
- dev: Allow js files (for import map) (3b4b16b)
- dev: Add greeting component to admin dashboard (becc12a)
- dev: Added all different options to get the session & add tailwind (57637ab)
- dev: Add currentAccount field (3f1711d)
DEPRECATION
getPayloadUser
is now deprecated. You should use getPayloadSession
instead:
- import { getPayloadUser } from "payload-authjs";
+ import { getPayloadSession } from "payload-authjs";
const ServerComponentExample = async () => {
- const payloadUser = await getPayloadUser();
+ const session = await getPayloadSession();
return (
<>
<h3>Payload CMS User:</h3>
- <pre>{JSON.stringify(payloadUser)}</pre>
+ <pre>{JSON.stringify(session?.user)}</pre>
</>
);
};
v0.6.1
v0.6.0
0.6.0 (2025-01-27)
π Features
- Add support for virtual fields (jwt session strategy) (d20f863)
- Add PayloadAuthjsUser helper type for authjs module declaration (c7e8f08)
- withPayload: Add custom evens to withPayload function (89e749c)
π©Ή Fixes
- PayloadAdapter: Improve data transformation and forward additional fields (9052f38)
π‘ Chore
- Replace banner (d354a51)
v0.5.0
0.5.0 (2025-01-25)
π Features
- Allow to customize the sign in button (#7)
- Improved users collection & add better support for customization (18810ec)
- basic-example: Add basic-example project (76fc27a)
π©Ή Fixes
- PayloadAdapter: Fix not found error on first sign in (afd1273)
π‘ Chore
- Add github issue template (5038483)
- Update dependencies (e74b980)
- Move README and add symlink (8b15168)
- Set minimal required payload version to 3.1.1 (c621343)
- Add banner (da224a0)
DATABASE SCHEMA CHANGE
Previously, this plugin always added session and verification token tables. Starting from 0.5.0
, the plugin determines whether you are using these features and adds the fields/tables conditionally. For this reason, the database schema is changed and you must create a migration.
Further information can be found in the discussions #9