Skip to content

Commit 0fe52d3

Browse files
Address review comments
1 parent ec96954 commit 0fe52d3

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

articles/quickstart/webapp/nextjs/01-login.md

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,8 @@ The SDK auto-configures the following routes:
9393
- `/auth/access-token`: The route to verify the user's session and return an <a href="https://auth0.com/docs/secure/tokens/access-tokens" target="_blank" rel="noreferrer">access token</a> (which automatically refreshes if a refresh token is available)
9494
- `/auth/backchannel-logout`: The route to receive a `logout_token` when a configured Back-Channel Logout initiator occurs
9595

96-
To learn more about routing in Auth0, read <a href="https://auth0.com/blog/auth0-stable-support-for-nextjs-app-router/" target="_blank" rel="noreferrer"> Add the dynamic API route</a>.
97-
9896
:::note
99-
The `/auth/access-token` route is enabled by default. If your clients do not need access tokens, you can disable the route by editing the file `lib/auth0.js` and setting `enableAccessTokenEndpoint` to `false` in the instance of the Auth0 client. :::
97+
The `/auth/access-token` route is enabled by default, but is only neccessary when the access token is needed on the client-side. If this isn't something you need, you can disable this endpoint by setting `enableAccessTokenEndpoint` to `false`. :::
10098

10199
## Add Login to Your Application
102100

@@ -154,24 +152,18 @@ export default function Profile() {
154152
const { user, isLoading } = useUser();
155153
return (
156154
<>
157-
{isLoading && <Loading />}
155+
{isLoading && <p>Loading...</p>}
158156
{user && (
159-
<>
160-
{isLoading && <p>Loading...</p>}
161-
{user && (
162-
<div data-testid="profile" style={{ textAlign: "center" }}>
163-
<img
164-
src={user.picture}
165-
alt="Profile"
166-
style={{ borderRadius: "50%", width: "80px", height: "80px" }}
167-
data-testid="profile-picture"
168-
/>
169-
<h2 data-testid="profile-name">{user.name}</h2>
170-
<p data-testid="profile-email">{user.email}</p>
171-
<pre data-testid="profile-json">{JSON.stringify(user, null, 2)}</pre>
172-
</div>
173-
)}
174-
</>
157+
<div style={{ textAlign: "center" }}>
158+
<img
159+
src={user.picture}
160+
alt="Profile"
161+
style={{ borderRadius: "50%", width: "80px", height: "80px" }}
162+
/>
163+
<h2>{user.name}</h2>
164+
<p>{user.email}</p>
165+
<pre>{JSON.stringify(user, null, 2)}</pre>
166+
</div>
175167
)}
176168
</>
177169
);

0 commit comments

Comments
 (0)