# 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.
