PerfectDraft's Cognito PreAuthentication Lambda now requires a "domain" field in ClientMetadata. The api.perfectdraft.com /authentication/sign-in gateway does not forward it, so every setup and reauth failed with "PreAuthentication failed with error 'domain'" (#11, #12, #13). authenticate() now calls Cognito InitiateAuth (USER_PASSWORD_AUTH) itself, the endpoint token refresh already uses. A failed sign-in now says what was rejected and why. A wrong email or password returns to the credentials form; a rejected token stays on the token step; both show Cognito's reason instead of the old blanket "token may have expired", which hid this outage. The README snippet copies the token to the clipboard. It captures copy() up front because Chromium removes it once the console command returns. Root cause and fix by @cesa030 in #11; confirmed in @brettjenkins' fork. Co-authored-by: Cursor <cursoragent@cursor.com>
71 lines
2.7 KiB
JSON
71 lines
2.7 KiB
JSON
{
|
|
"config": {
|
|
"step": {
|
|
"user": {
|
|
"title": "PerfectDraft Account",
|
|
"description": "Enter your PerfectDraft app credentials.",
|
|
"data": {
|
|
"email": "Email",
|
|
"password": "Password"
|
|
}
|
|
},
|
|
"token": {
|
|
"title": "Verification Token",
|
|
"description": "Paste a verification token from PerfectDraft's website. See the [setup instructions](https://github.com/Falkvinge/hassio-integration-perfectdraft-pro#step-2-verification-token) for the 30-second walkthrough. The token expires in 2 minutes, so generate it right before pasting.",
|
|
"data": {
|
|
"recaptcha_token": "Verification Token"
|
|
}
|
|
},
|
|
"reauth_confirm": {
|
|
"title": "Re-authenticate PerfectDraft",
|
|
"description": "Your session has expired. Please re-enter your credentials.",
|
|
"data": {
|
|
"email": "Email",
|
|
"password": "Password"
|
|
}
|
|
}
|
|
},
|
|
"error": {
|
|
"invalid_auth": "Authentication failed: {reason}. Try again with a fresh token.",
|
|
"invalid_credentials": "PerfectDraft rejected the email or password: {reason}.",
|
|
"token_rejected": "PerfectDraft rejected the verification token: {reason}. Generate a fresh token and paste it within 2 minutes.",
|
|
"cannot_connect": "Cannot connect to PerfectDraft service.",
|
|
"unknown": "An unexpected error occurred."
|
|
},
|
|
"abort": {
|
|
"already_configured": "This PerfectDraft account is already configured.",
|
|
"reauth_successful": "Re-authentication successful.",
|
|
"reauth_account_mismatch": "Those credentials are for a different PerfectDraft account. Re-authenticate with the account this integration was set up with, or delete the integration and add the other account separately.",
|
|
"already_in_progress": "Setup for this PerfectDraft account is already under way. Finish or cancel the pending flow first — look for it under Settings > Devices & Services."
|
|
}
|
|
},
|
|
"entity": {
|
|
"sensor": {
|
|
"temperature": { "name": "Temperature" },
|
|
"keg_remaining": { "name": "Keg Remaining" },
|
|
"keg_product_id": { "name": "Keg Product" },
|
|
"keg_name": { "name": "Keg" },
|
|
"connection": { "name": "Connection" },
|
|
"door": { "name": "Door" },
|
|
"pours": { "name": "Pours" },
|
|
"last_pour": { "name": "Last Pour" },
|
|
"firmware": { "name": "Firmware" },
|
|
"mode": { "name": "Mode" },
|
|
"keg_freshness": { "name": "Keg Freshness" }
|
|
},
|
|
"button": {
|
|
"mark_keg_changed": { "name": "Mark Keg Changed" }
|
|
}
|
|
},
|
|
"options": {
|
|
"step": {
|
|
"init": {
|
|
"title": "PerfectDraft Options",
|
|
"data": {
|
|
"scan_interval": "Polling interval (seconds)"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|