<commit_before>---
title: Login
description: This tutorial demonstrates how to add user login, logout, and profile to a Node.js Express application.
budicon: 448
topics:
  - quickstarts
  - webapp
  - login
  - user profile
  - logout
  - nodejs
contentType: tutorial
useCase: quickstart
github:
  path: 01-Login
---

<%= include('../../../_includes/_new_app', { hideDownloadSample: true, hideDashboardScreenshot: true }) %>
<%= include('../../../_includes/_callback_url') %>
<%= include('../../../_includes/_logout_url' }) %>

## Integrate Auth0
### Install Dependencies
Install the following dependencies

- [`express-openid-connect`](https://github.com/auth0/express-openid-connect) - Auth0-maintained OIDC-compliant library for Express.
- [`express-session`](https://github.com/auth0/express-session) - session middleware for Express.

```sh
npm install express express-openid-connect express-session
```

### Handling server responses
Your application will need to parse URL-encoded data sent back from the Auth0 server.  Express provides a middleware for this called `express.urlencoded`. If you are integrating an existing application that uses `urlencoded` from the `body-parser`module, that will work as well.

```js<commit_msg>callback url, logout url<commit_after>---
title: Login
description: This tutorial demonstrates how to add user login, logout, and profile to a Node.js Express application.
budicon: 448
topics:
  - quickstarts
  - webapp
  - login
  - user profile
  - logout
  - nodejs
contentType: tutorial
useCase: quickstart
github:
  path: 01-Login
---

<%= include('../../../_includes/_new_app', { hideDownloadSample: true, hideDashboardScreenshot: true }) %>

<%= include('../../../_includes/_callback_url') %>

:::note
If you are running this project on your local machine, the callback URL you need to whitelist in the **Allowed Callback URLs** field is `http://localhost:3000/callback`.
:::

<%= include('../../../_includes/_logout_url' }) %>

:::note
If you are running this project on your local machine, the logout URL you need to whitelist in the **Allowed Logout URLs** field is `http://localhost:3000/logout`.
:::

## Integrate Auth0
### Install Dependencies
Install the following dependencies

- [`express-openid-connect`](https://github.com/auth0/express-openid-connect) - Auth0-maintained OIDC-compliant library for Express.
- [`express-session`](https://github.com/auth0/express-session) - session middleware for Express.

```sh
npm install express express-openid-connect express-session
```

### Handling server responses
Your application will need to parse URL-encoded data sent back from the Auth0 server.  Express provides a middleware for this called `express.urlencoded`. If you are integrating an existing application that uses `urlencoded` from the `body-parser`module, that will work as well.

```js
{'fraction_non_alphanumeric': 0.1282051282051282, 'fraction_numerical': 0.009834913944502985, 'mean_word_length': 4.274074074074074, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5004701', 'n_tokens_mistral': 846, 'n_tokens_neox': 797, 'n_words': 280}