> For the complete documentation index, see [llms.txt](https://dar-open-network.gitbook.io/developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dar-open-network.gitbook.io/developers/dar-id/authentication.md).

# Authentication

### Authentication Flow

1. Redirect users to request their DAR ID identity
2. Users are redirected back to your site
3. Exchange the code for an access token
4. Refresh the access token when needed
5. Use the access token to access user information

### Environment Configuration

#### FRONTEND\_URL

* Prod: `https://app.dalarnia.com/login/`
* Dev: `https://app-testnet.dalarnia.com/login/`

#### AUTH\_DOMAIN

* Prod & Dev: `https://testauth.dalarnia.com/`

> This is the domain used for all OAuth2 authentication-related endpoints, including authorization, token exchange, and user information retrieval.
