Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update application_credentials example with redirect_url #2547

Merged
merged 1 commit into from
Jan 31, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/core/platform/application_credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Translations for Application Credentials are defined under the `application_cred
```json
{
"application_credentials": {
"description": "Navigate to the [developer console]({console_url}) to create credentials then enter them below.",
"description": "Navigate to the [developer console]({console_url}) to create credentials. Add `{redirect_url}` under *Authorized redirect URI*. Then enter the credentials below.",
}
}
```
Expand All @@ -141,12 +141,14 @@ You may optionally add description placeholder keys that are added to the messag

```python
from homeassistant.core import HomeAssistant
from homeassistant.helpers import config_entry_oauth2_flow

async def async_get_description_placeholders(hass: HomeAssistant) -> dict[str, str]:
"""Return description placeholders for the credentials dialog."""
return {
"console_url": "https://example.com/developer/console",
"redirect_url": config_entry_oauth2_flow.async_get_redirect_uri(hass),
}
```

While developing locally, you will need to run `python3 -m script.translations develop` to see changes made to `strings.json` [More info on translating Home Assistant.](translations.md)
While developing locally, you will need to run `python3 -m script.translations develop` to see changes made to `strings.json` [More info on translating Home Assistant.](translations.md)