Update Notion auth to store refresh tokens instead of account passwords (#109670)

This commit is contained in:
Aaron Bach 2024-02-12 20:35:06 -07:00 committed by GitHub
parent 92c3c401b9
commit e3c838d512
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 142 additions and 47 deletions

View file

@ -5,12 +5,12 @@ from typing import Any
from homeassistant.components.diagnostics import async_redact_data
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_EMAIL, CONF_PASSWORD, CONF_UNIQUE_ID, CONF_USERNAME
from homeassistant.const import CONF_EMAIL, CONF_UNIQUE_ID, CONF_USERNAME
from homeassistant.core import HomeAssistant
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
from . import NotionData
from .const import DOMAIN
from .const import CONF_REFRESH_TOKEN, CONF_USER_UUID, DOMAIN
CONF_DEVICE_KEY = "device_key"
CONF_HARDWARE_ID = "hardware_id"
@ -23,12 +23,13 @@ TO_REDACT = {
CONF_EMAIL,
CONF_HARDWARE_ID,
CONF_LAST_BRIDGE_HARDWARE_ID,
CONF_PASSWORD,
CONF_REFRESH_TOKEN,
# Config entry title and unique ID may contain sensitive data:
CONF_TITLE,
CONF_UNIQUE_ID,
CONF_USERNAME,
CONF_USER_ID,
CONF_USER_UUID,
}