You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/quickstart/webapp/nextjs/01-login.md
+39-40Lines changed: 39 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -84,45 +84,7 @@ export const auth0 = new Auth0Client({
84
84
});
85
85
```
86
86
87
-
88
-
### Add the dynamic API route handler
89
-
90
-
Create a file at `app/api/shows/route.js`. This is your route Handler file using <ahref="https://nextjs.org/docs/app/building-your-application/routing/route-handlers#dynamic-route-segments"target="_blank"rel="noreferrer">Dynamic Route Segment</a>. The file declares a `GET` export to call the `shows()` method from the SDK to create the API routes. import the `handleAuth` method from the SDK and call it from the `GET` export.
Upon execution, the following routes are available:
87
+
The SDK auto-configures the following routes:
126
88
127
89
-`/auth/login`: The route to perform login with Auth0
128
90
-`/auth/logout`: The route to log the user out
@@ -243,7 +205,44 @@ export default async function ProfileServer() {
243
205
244
206
:::panel Checkpoint
245
207
Verify that you can display the `user.name` or <ahref="https://auth0.com/docs/users/user-profile-structure#user-profile-attributes"target="_blank"rel="noreferrer">any other</a> `user` property within a component correctly after you have logged in.
246
-
:::
208
+
:::
209
+
210
+
### Create custom routes using the dynamic API route handler
211
+
212
+
Create the file at `app/api/shows/route.js`. This is your route Handler file using <ahref="https://nextjs.org/docs/app/building-your-application/routing/route-handlers#dynamic-route-segments"target="_blank"rel="noreferrer">Dynamic Route Segment</a>. The file declares a `GET` export to call the `shows()` method from the SDK to create custom API routes. import the `handleAuth` method from the SDK and call it from the `GET` export.
0 commit comments