Skip to content

Commit 9b44c89

Browse files
authored
Update 01-login.md
1 parent 210d388 commit 9b44c89

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

Diff for: articles/quickstart/webapp/nextjs/01-login.md

+14-13
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,16 @@ AUTH0_SCOPE='openid profile email read:shows'
4444
```
4545

4646
- `AUTH0_SECRET`: A long secret value used to encrypt the session cookie. You can generate a suitable string using `openssl rand -hex 32` on the command line.
47-
- `APP_BASE_URL`: The base URL of your application.
48-
- `AUTH0_DOMAIN`: The URL of your Auth0 tenant domain. If you are using a <a href="https://auth0.com/docs/custom-domains" target="_blank" rel="noreferrer">Custom Domain with Auth0</a>, set this to the value of your Custom Domain instead of the value reflected in the "Settings" tab.
49-
- `AUTH0_CLIENT_ID`: Your Auth0 application's Client ID.
50-
- `AUTH0_CLIENT_SECRET`: Your Auth0 application's Client Secret.
47+
- `APP_BASE_URL`: The base URL of your application
48+
- `AUTH0_DOMAIN`: The URL of your Auth0 tenant domain
49+
- `AUTH0_CLIENT_ID`: Your Auth0 application's Client ID
50+
- `AUTH0_CLIENT_SECRET`: Your Auth0 application's Client Secret
5151

5252
The SDK will read these values from the Node.js process environment and configure itself automatically.
5353

5454
::: note
5555
Manually add the values for `AUTH0_AUDIENCE` and `AUTH_SCOPE` to the file `lib/auth0.js`. These values are not configured automatically.
56+
If you are using a <a href="https://auth0.com/docs/custom-domains" target="_blank" rel="noreferrer">Custom Domain with Auth0</a>, set this to the value of your Custom Domain instead of the value reflected in the "Settings" tab.
5657
:::
5758

5859
### Create the Auth0 SDK Client
@@ -121,27 +122,27 @@ export const GET = async function shows() {
121122
};
122123
```
123124

124-
Upon execution the following routes for your customers are available:
125+
Upon execution, the following routes for your customers are available:
125126

126-
- `/auth/login`: The route to perform login with Auth0.
127-
- `/auth/logout`: The route to log the user out.
128-
- `/auth/callback`: The route Auth0 will redirect the user to after a successful login.
129-
- `/auth/profile`: The route to fetch the user profile.
130-
- `/auth/access-token`: The route to verify the user's session and return an access token (which automatically refreshes if a refresh token is available).
131-
- `/auth/backchannell-logout`: The route to receive a logout_token when a configured Back-Channel Logout initiator occurs.
127+
- `/auth/login`: The route to perform login with Auth0
128+
- `/auth/logout`: The route to log the user out
129+
- `/auth/callback`: The route Auth0 will redirect the user to after a successful login
130+
- `/auth/profile`: The route to fetch the user profile
131+
- `/auth/access-token`: The route to verify the user's session and return an access token (which automatically refreshes if a refresh token is available)
132+
- `/auth/backchannell-logout`: The route to receive a `logout_token` when a configured Back-Channel Logout initiator occurs
132133

133134
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>.
134135

135136
## Add Login to Your Application
136137

137-
Users can now log in to your application at `/api/auth/login` route provided by the SDK. Use an **anchor tag** to add a link to the login route, the route redirects your users to the Auth0 Universal Login Page, where Auth0 can authenticate them. Upon successful authentication, Auth0 redirects your users back to your application.
138+
Users can now log in to your application at `/api/auth/login` route provided by the SDK. Use an **anchor tag** to add a link to the login route to redirect your users to the Auth0 Universal Login Page, where Auth0 can authenticate them. Upon successful authentication, Auth0 redirects your users back to your application.
138139

139140
```html
140141
<a href="/auth/login">Login</a>
141142
```
142143

143144
:::note
144-
Next suggest using <a href="https://nextjs.org/docs/api-reference/next/link" target="_blank" rel="noreferrer">Link</a> components instead of anchor tags, but since these are API routes and not pages, anchor tags are needed.
145+
Next.js suggest using <a href="https://nextjs.org/docs/api-reference/next/link" target="_blank" rel="noreferrer">Link</a> components instead of anchor tags, but since these are API routes and not pages, anchor tags are needed.
145146
:::
146147

147148
:::panel Checkpoint

0 commit comments

Comments
 (0)