Add trusted networks auth provider (#15812)
* Add context to login flow * Add trusted networks auth provider * source -> context
This commit is contained in:
parent
50daef9a52
commit
da8f93dca2
6 changed files with 247 additions and 12 deletions
|
@ -344,7 +344,10 @@ class ActiveConnection:
|
|||
if request[KEY_AUTHENTICATED]:
|
||||
authenticated = True
|
||||
|
||||
else:
|
||||
# always request auth when auth is active
|
||||
# even request passed pre-authentication (trusted networks)
|
||||
# or when using legacy api_password
|
||||
if self.hass.auth.active or not authenticated:
|
||||
self.debug("Request auth")
|
||||
await self.wsock.send_json(auth_required_message())
|
||||
msg = await wsock.receive_json()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue