diff options
author | Denys Konovalov <privat@denyskon.de> | 2023-06-05 09:00:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-05 15:00:12 +0800 |
commit | ca35dec18b3d3d7dd5cde4c69a10ae830961faf7 (patch) | |
tree | e52b1b9c3032aadd8b5fae7dabec88b0de7ef4b4 /templates | |
parent | 7d192cb674bc475b123c84b205aca821247c5dd1 (diff) | |
download | gitea-ca35dec18b3d3d7dd5cde4c69a10ae830961faf7.tar.gz gitea-ca35dec18b3d3d7dd5cde4c69a10ae830961faf7.zip |
Add ability to set multiple redirect URIs in OAuth application UI (#25072)
OAuth applications can already have multiple redirect URIs if
created/edited over API.
This change allows for setting multiple redirect URIs through the UI as
a comma-separated list (e. g.
`https://example.org/redirect,https://redirect.example.org`)
<details>
<summary>Screenshots</summary>
![Bildschirmfoto vom 2023-06-04
17-14-40](https://github.com/go-gitea/gitea/assets/47871822/2206dc32-e7e4-4953-9ecb-e098890b3f54)
![Bildschirmfoto vom 2023-06-04
17-14-50](https://github.com/go-gitea/gitea/assets/47871822/cd97c73c-9310-44ee-a83a-b927a1ef94da)
</details>
Closes #25068
Diffstat (limited to 'templates')
-rw-r--r-- | templates/user/settings/applications_oauth2_edit_form.tmpl | 4 | ||||
-rw-r--r-- | templates/user/settings/applications_oauth2_list.tmpl | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/templates/user/settings/applications_oauth2_edit_form.tmpl b/templates/user/settings/applications_oauth2_edit_form.tmpl index 45f12f22d0..e19efe3147 100644 --- a/templates/user/settings/applications_oauth2_edit_form.tmpl +++ b/templates/user/settings/applications_oauth2_edit_form.tmpl @@ -39,8 +39,8 @@ <input id="application-name" value="{{.App.Name}}" name="application_name" required maxlength="255"> </div> <div class="field {{if .Err_RedirectURI}}error{{end}}"> - <label for="redirect-uri">{{.locale.Tr "settings.oauth2_redirect_uri"}}</label> - <input type="url" name="redirect_uri" value="{{.App.PrimaryRedirectURI}}" id="redirect-uri" required> + <label for="redirect-uris">{{.locale.Tr "settings.oauth2_redirect_uris"}}</label> + <textarea name="redirect_uris" id="redirect-uris" required>{{StringUtils.Join .App.RedirectURIs "\n"}}</textarea> </div> <div class="field ui checkbox {{if .Err_ConfidentialClient}}error{{end}}"> <label>{{.locale.Tr "settings.oauth2_confidential_client"}}</label> diff --git a/templates/user/settings/applications_oauth2_list.tmpl b/templates/user/settings/applications_oauth2_list.tmpl index 2e42ed2758..e18c7f56b8 100644 --- a/templates/user/settings/applications_oauth2_list.tmpl +++ b/templates/user/settings/applications_oauth2_list.tmpl @@ -34,8 +34,8 @@ <input id="application-name" name="application_name" value="{{.application_name}}" required maxlength="255"> </div> <div class="field {{if .Err_RedirectURI}}error{{end}}"> - <label for="redirect-uri">{{.locale.Tr "settings.oauth2_redirect_uri"}}</label> - <input type="url" name="redirect_uri" id="redirect-uri"> + <label for="redirect-uris">{{.locale.Tr "settings.oauth2_redirect_uris"}}</label> + <textarea name="redirect_uris" id="redirect-uris"></textarea> </div> <div class="field ui checkbox {{if .Err_ConfidentialClient}}error{{end}}"> <label>{{.locale.Tr "settings.oauth2_confidential_client"}}</label> |