Skip to content

Conversation

@ahuseyn
Copy link
Member

@ahuseyn ahuseyn commented Sep 12, 2025

Description

This PR implements authentication functionality to the Next.js kitchen-sink example and adds a new @faustjs/auth package. The major changes include implementing login, logout, and user session management hooks, integrating these features into the example app's UI, and updating dependencies and configuration to support authentication.

Authentication feature integration:

  • Added the new @faustjs/auth package, including its configuration defaults and peer dependencies (iron-session, jsonwebtoken).
  • Implemented authentication hooks (useLogin, useLogout, useUser) in packages/nextjs/pages/auth/hooks/, and exported them for use in Next.js apps.

Kitchen-sink example app updates:

  • Integrated login/logout UI and session management in the Header component, including a modal-based login form and user dropdown.

  • Added API route /api/session/[action].js for session actions using authRouter and the new session configuration.
    Supporting improvements:

  • Enhanced the GraphQL client to allow passing additional request headers, supporting authenticated requests.

Related Issue(s):

@ahuseyn ahuseyn requested a review from a team as a code owner September 12, 2025 10:01
@changeset-bot
Copy link

changeset-bot bot commented Sep 12, 2025

⚠️ No Changeset found

Latest commit: 86d68bb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "@faustwp/core" specified in the `linked` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "@faustwp/cli" specified in the `linked` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "@faustwp/getting-started-example" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

@ahuseyn ahuseyn closed this Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants