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

Auth0 V2 migration update #45302

Merged
merged 2 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/auth0/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"start": "next start"
},
"dependencies": {
"@auth0/nextjs-auth0": "^1.9.1",
"@auth0/nextjs-auth0": "^2.2.0",
"next": "latest",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/auth0/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UserProvider } from '@auth0/nextjs-auth0'
import { UserProvider } from '@auth0/nextjs-auth0/client'

export default function App({ Component, pageProps }) {
// optionally pass the 'user' prop from pages that require server-side
Expand Down
2 changes: 1 addition & 1 deletion examples/auth0/pages/about.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useUser } from '@auth0/nextjs-auth0'
import { useUser } from '@auth0/nextjs-auth0/client'
import Layout from '../components/layout'

const About = () => {
Expand Down
2 changes: 1 addition & 1 deletion examples/auth0/pages/advanced/api-profile.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react'
import { useUser } from '@auth0/nextjs-auth0'
import { useUser } from '@auth0/nextjs-auth0/client'
import Layout from '../../components/layout'

const ApiProfile = () => {
Expand Down
2 changes: 1 addition & 1 deletion examples/auth0/pages/api/protected-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'
// Protected API, requests to '/api/protected' without a valid session cookie will fail

async function handle(req, res) {
const { user } = getSession(req, res)
const { user } = await getSession(req, res)

try {
res.status(200).json({
Expand Down
2 changes: 1 addition & 1 deletion examples/auth0/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useUser } from '@auth0/nextjs-auth0'
import { useUser } from '@auth0/nextjs-auth0/client'
import Layout from '../components/layout'

const Home = () => {
Expand Down
2 changes: 1 addition & 1 deletion examples/auth0/pages/profile.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { withPageAuthRequired } from '@auth0/nextjs-auth0'
import { withPageAuthRequired } from '@auth0/nextjs-auth0/client'
import Layout from '../components/layout'
import { User } from '../interfaces'

Expand Down