Skip to content

v0.7.0

Compare
Choose a tag to compare
@CrawlerCode CrawlerCode released this 09 Feb 20:30

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>
    </>
  );
};