After OAUTH, SAML auth completion, Redirect to App custom url scheme with token data as query params. (#16447)

* Added redirection after Auth complete

* Fixed gofmt

* Handling error while parsing the url, added util function to check for a valid mobile redirect url

* Added check for custom scheme url validation

* Added test to verify custom schele url

* Added mobile message screens

* Translation strings for mobile screens

* Added mobile specific screens for success and error

* Added error logs and changed variable name for consistency with oauth.go

* i18n fix

* Reusing assigned variable instead of map

* Added AppCustomUrlScheme property

* Code refactor and removed dependency from cookies to build the final url

* Changed util function

* Updated util test

* Fixed go lint

* Code refactor and unsused code removed

* Code refactor

* simplified boolean checks

* Added support of whitelist of appCustomURLSchemes

* Changed i18 en

* Fixed validating redirecturl for web

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Anurag Shivarathri
2021-01-19 21:16:22 +05:30
коммит произвёл GitHub
родитель 911d1f070e
Коммит 3da6f270ec
7 изменённых файлов: 267 добавлений и 55 удалений

Просмотреть файл

@@ -171,6 +171,10 @@
"id": "api.admin.upload_brand_image.too_large.app_error",
"translation": "Unable to upload file. File is too large."
},
{
"id": "api.back_to_app",
"translation": "Back to {{.SiteName}}"
},
{
"id": "api.bot.create_disabled",
"translation": "Bot creation has been disabled."
@@ -1448,6 +1452,14 @@
"id": "api.invalid_channel",
"translation": "Channel listed in the request doesn't belong to the user"
},
{
"id": "api.invalid_custom_url_scheme",
"translation": "Invalid custom url scheme has been provided"
},
{
"id": "api.invalid_redirect_url",
"translation": "Invalid redirect url has been provided"
},
{
"id": "api.io_error",
"translation": "input/output error"
@@ -1564,10 +1576,18 @@
"id": "api.oauth.allow_oauth.turn_off.app_error",
"translation": "The system admin has turned off OAuth2 Service Provider."
},
{
"id": "api.oauth.auth_complete",
"translation": "Authentication complete"
},
{
"id": "api.oauth.authorize_oauth.disabled.app_error",
"translation": "The system admin has turned off OAuth2 Service Provider."
},
{
"id": "api.oauth.close_browser",
"translation": "You can close this browser tab now."
},
{
"id": "api.oauth.get_access_token.bad_client_id.app_error",
"translation": "invalid_request: Bad client_id."
@@ -1628,6 +1648,10 @@
"id": "api.oauth.invalid_state_token.app_error",
"translation": "Invalid state token."
},
{
"id": "api.oauth.redirecting_back",
"translation": "Redirecting you back to the app."
},
{
"id": "api.oauth.register_oauth_app.turn_off.app_error",
"translation": "The system admin has turned off OAuth2 Service Provider."
@@ -6698,6 +6722,10 @@
"id": "ent.user.complete_switch_with_oauth.blank_email.app_error",
"translation": "Unable to complete SAML login with an empty email address."
},
{
"id": "error",
"translation": "Error"
},
{
"id": "group_not_associated_to_synced_team",
"translation": "Group cannot be associated to the channel until it is first associated to the parent group-synced team."