# Backend choice by users

Authentication | Users | Password
--- | --- | ---
✔ | ✔ | ✔

## Presentation

By default, only the configured authentication backend is available for users.

Contrary to multiple backend stacking, backend choice will present all available authentication methods to users, who will choose the one they want.

The choice will concern three backends:

- Authentication
- Users
- Password

The choosen backends will be registered in session:

- `$_auth`
- `$_userDB`
- `$_passwordDB`

Authentication choice will also be registered in session:

- `$_authChoice`

## Configuration

In Manager, go in `General Parameters` > `Authentication modules` and choose Choice for authentication.

When `Choice` is selected for authentication, values for Users and Password modules are not used anymore. Also, all backends parameters are displayed.

Then, go in `Choice Parameters`:

- URL parameter: parameter name used to set choice value (default: `lmAuth`)
- Allowed modules: click on `New choice` to add a choice.

Define here:

- Key name: Text displayed on choice tab.
- Authentication module
- User module
- Password module

You can prefix the key name with a digit to order them. The digit will not be shown on portal page.