diff --git a/app/constants/index.js b/app/constants/index.js index 4b5351208..d245bb192 100644 --- a/app/constants/index.js +++ b/app/constants/index.js @@ -9,6 +9,7 @@ import DeepLinkTypes from './deep_linking'; import DeviceTypes from './device'; import ListTypes from './list'; import NavigationTypes from './navigation'; +import Sso from './sso'; import Types from './types'; import ViewTypes from './view'; import WebsocketEvents from './websocket'; @@ -21,6 +22,7 @@ export { DateTypes, ListTypes, NavigationTypes, + Sso, Types, ViewTypes, WebsocketEvents, diff --git a/app/constants/sso.ts b/app/constants/sso.ts new file mode 100644 index 000000000..249b608d3 --- /dev/null +++ b/app/constants/sso.ts @@ -0,0 +1,21 @@ +// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. +// See LICENSE.txt for license information. + +import keyMirror from '@mm-redux/utils/key_mirror'; + +export const REDIRECT_URL_SCHEME = 'mmauth://'; +export const REDIRECT_URL_SCHEME_DEV = 'mmauthbeta://'; + +const constants = keyMirror({ + SAML: null, + GITLAB: null, + GOOGLE: null, + OFFICE365: null, + OPENID: null, +}); + +export default { + ...constants, + REDIRECT_URL_SCHEME, + REDIRECT_URL_SCHEME_DEV, +}; diff --git a/app/screens/login_options/login_options.js b/app/screens/login_options/login_options.js index 0b6e2f176..9d0638681 100644 --- a/app/screens/login_options/login_options.js +++ b/app/screens/login_options/login_options.js @@ -20,9 +20,8 @@ import gitlab from '@assets/images/gitlab.png'; import google from '@assets/images/google.png'; import FormattedText from '@components/formatted_text'; import StatusBar from '@components/status_bar'; -import {ViewTypes} from '@constants'; +import {Sso} from '@constants'; import globalEventHandler from '@init/global_event_handler'; -import {isMinimumServerVersion} from '@mm-redux/utils/helpers'; import {preventDoubleTap} from '@utils/tap'; import {GlobalStyles} from 'app/styles'; @@ -172,7 +171,7 @@ export default class LoginOptions extends PureComponent { return (