Merge pull request #16383 from CartoDB/feature/sc-198852/update-developers-carto-com-login-redirection

[sc198852] Add custom redirection on `developers.carto.com`
pull/16377/head
Shylpx 3 years ago committed by GitHub
commit 6704b14cd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -41,6 +41,7 @@ Development
- Migrate Redis DO subscription information in inter-cloud migrations [#16315](https://github.com/CartoDB/cartodb/pull/16315) - Migrate Redis DO subscription information in inter-cloud migrations [#16315](https://github.com/CartoDB/cartodb/pull/16315)
- OauthApps restricted by default [#16304](https://github.com/CartoDB/cartodb/pull/16304) - OauthApps restricted by default [#16304](https://github.com/CartoDB/cartodb/pull/16304)
- Support staging hostname in the catalog [#16258](https://github.com/CartoDB/cartodb/pull/16258) - Support staging hostname in the catalog [#16258](https://github.com/CartoDB/cartodb/pull/16258)
- Add custom redirection on `developers.carto.com/login` [#16383](https://github.com/CartoDB/cartodb/pull/16383)
- Fix user migration export/import logs [#16298](https://github.com/CartoDB/cartodb/pull/16298) - Fix user migration export/import logs [#16298](https://github.com/CartoDB/cartodb/pull/16298)
- Fix race condition when DO subscriptions are created [#16311](https://github.com/CartoDB/cartodb/pull/16311) - Fix race condition when DO subscriptions are created [#16311](https://github.com/CartoDB/cartodb/pull/16311)
- Allow the usage of WMTS URLs with parameters to create custom basemaps [#16271](https://github.com/CartoDB/cartodb/pull/16271) - Allow the usage of WMTS URLs with parameters to create custom basemaps [#16271](https://github.com/CartoDB/cartodb/pull/16271)

@ -39,6 +39,7 @@ class SessionsController < ApplicationController
before_filter :load_organization before_filter :load_organization
before_filter :initialize_oauth_config before_filter :initialize_oauth_config
before_filter :api_authorization_required, only: :show before_filter :api_authorization_required, only: :show
before_action :custom_redirect, only: :new
after_action :set_last_mfa_activity, only: [:multifactor_authentication, :multifactor_authentication_verify_code] after_action :set_last_mfa_activity, only: [:multifactor_authentication, :multifactor_authentication_verify_code]
PLEASE_LOGIN = 'Please, log in to continue using CARTO.'.freeze PLEASE_LOGIN = 'Please, log in to continue using CARTO.'.freeze
@ -316,6 +317,12 @@ class SessionsController < ApplicationController
private private
# HACK: CARTO internals custom redirection
# https://app.shortcut.com/cartoteam/story/198852/update-developers-carto-com-login-redirection-to-carto-com-signin
def custom_redirect
redirect_to('https://carto.com/signin/') if CartoDB.extract_subdomain(request) == 'developers'
end
def mfa_request? def mfa_request?
params[:code].presence || params[:skip].presence params[:code].presence || params[:skip].presence
end end

Loading…
Cancel
Save