Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4.0.0-beta.7 - Cannot export withMiddlewareAuthRequired() #1812

Open
6 tasks done
SvitlanaNedilko opened this issue Nov 20, 2024 · 1 comment
Open
6 tasks done

v4.0.0-beta.7 - Cannot export withMiddlewareAuthRequired() #1812

SvitlanaNedilko opened this issue Nov 20, 2024 · 1 comment

Comments

@SvitlanaNedilko
Copy link

Checklist

Description

I would like to be able to use withMiddlewareAuthRequired by import { useUser } from '@auth0/nextjs-auth0/edge' but Cannot find module @auth0/nextjs-auth0/edge or its corresponding type declarations.

In previous versions we were able to do

import { UserProfile, useUser } from '@auth0/nextjs-auth0/client'

Reproduction

import withMiddlewareAuthRequired

Additional context

No response

nextjs-auth0 version

4.0.0-beta.7

Next.js version

14.2.17

Node.js version

22.11.0

@guabu
Copy link

guabu commented Nov 20, 2024

Hi @SvitlanaNedilko 👋 The v4 of the SDK exports the middleware under a different method and does not protect pages by default.

We have some docs on how to get a Next.js application set up using v4 of the SDK: https://github.com/auth0/nextjs-auth0/tree/v4?tab=readme-ov-file#getting-started

We plan to also add some migration docs to assist developers migrating from v3 to v4.

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

No branches or pull requests

2 participants