Add multi-factor authentication modules (#15489)
* Get user after login flow finished * Add multi factor authentication support * Typings
This commit is contained in:
parent
ae63980152
commit
7e7f9bc6ac
18 changed files with 925 additions and 46 deletions
|
@ -15,11 +15,14 @@ BASE_CONFIG = [{
|
|||
}]
|
||||
}]
|
||||
|
||||
EMPTY_CONFIG = []
|
||||
|
||||
|
||||
async def async_setup_auth(hass, aiohttp_client, provider_configs=BASE_CONFIG,
|
||||
setup_api=False):
|
||||
"""Helper to set up authentication and create an HTTP client."""
|
||||
hass.auth = await auth.auth_manager_from_config(hass, provider_configs)
|
||||
module_configs=EMPTY_CONFIG, setup_api=False):
|
||||
"""Helper to set up authentication and create a HTTP client."""
|
||||
hass.auth = await auth.auth_manager_from_config(
|
||||
hass, provider_configs, module_configs)
|
||||
ensure_auth_manager_loaded(hass.auth)
|
||||
await async_setup_component(hass, 'auth', {
|
||||
'http': {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue