Skip to content

Releases: CrawlerCode/payload-authjs

v0.8.1

14 Apr 21:30
Compare
Choose a tag to compare

0.8.1 (2025-04-14)

🩹 Fixes

  • Change the behavior of the SignIn button for login with provider (#24)
  • Remove email field duplication if enableLocalStrategy (#29)

🏑 Chore

  • dev: Allow login with username for local strategy (b8c24b5)
  • nx: Rename examples to example (a0d1ab9)

v0.8.0

06 Apr 20:56
Compare
Choose a tag to compare

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

  • Add missing import for example (e3caebc)
  • Improve setup section (4c54dfd)

🏑 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

  • multiple-auth-collections: Add example for using multiple authentication collections (b0ff26a)
  • with-payload-local-strategy: Add example for using payload local strategy (baa762d)
  • basic: Enable middleware by default (7374439)

v0.7.1

09 Feb 22:30
Compare
Choose a tag to compare

0.7.1 (2025-02-09)

🩹 Fixes

  • Register me hook always to provider expires timestamp (#12)
  • PayloadSessionProvider: Fix broken PayloadSessionProvider (67df23d)

v0.7.0

09 Feb 20:30
Compare
Choose a tag to compare

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

05 Feb 22:53
Compare
Choose a tag to compare

0.6.1 (2025-02-05)

🩹 Fixes

  • Fix findField function for subfields (#13)

πŸ“– Documentation

🏑 Chore

  • deps: Update npm dependencies (804f3f3)

v0.6.0

27 Jan 22:13
Compare
Choose a tag to compare

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

v0.5.0

25 Jan 17:40
Compare
Choose a tag to compare

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

v0.4.0

08 Dec 16:12
Compare
Choose a tag to compare

0.4.0 (2024-12-08)

πŸš€ Features

  • Set default access control (read, update and delete own user) (edaf753)

🩹 Fixes

  • PayloadAdapter: Check account provider in getUserByAccount method (75b88c0)

🏑 Chore

  • Migrate to payload 3 stable version (2db3139)
  • Update dependencies (d7338aa)

v0.3.4

03 Nov 18:11
Compare
Choose a tag to compare

0.3.4 (2024-11-03)

🩹 Fixes

  • getPayloadUser: Throw no serverURL error after cookie statement (#5)
  • getPayloadUser: Improved type (9866498)

πŸ“– Documentation

v0.3.3

30 Oct 16:19
Compare
Choose a tag to compare

0.3.3 (2024-10-30)

🩹 Fixes

🏑 Chore

  • Migrate to @payloadcms/eslint-config 3 beta (7d0ec8d)
  • dev: Update payload files (e4a6282)