Add multi-factor authentication modules (#15489)

* Get user after login flow finished

* Add multi factor authentication support

* Typings
This commit is contained in:
Jason Hu 2018-08-22 00:52:34 -07:00 committed by Paulus Schoutsen
parent ae63980152
commit 7e7f9bc6ac
18 changed files with 925 additions and 46 deletions

View file

@ -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': {