Skip to content

Commit

Permalink
chore(auth): Unflag auto redirect to region with login
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Nov 15, 2023
1 parent 51609ed commit 06344c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
1 change: 0 additions & 1 deletion frontend/src/lib/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ export const FEATURE_FLAGS = {
NOTEBOOKS: 'notebooks', // owner: #team-monitoring
EARLY_ACCESS_FEATURE_SITE_BUTTON: 'early-access-feature-site-button', // owner: @neilkakkar
HEDGEHOG_MODE_DEBUG: 'hedgehog-mode-debug', // owner: @benjackwhite
AUTO_REDIRECT: 'auto-redirect', // owner: @lharries
GENERIC_SIGNUP_BENEFITS: 'generic-signup-benefits', // experiment, owner: @raquelmsmith
WEB_ANALYTICS: 'web-analytics', // owner @robbie-c #team-web-analytics
HIGH_FREQUENCY_BATCH_EXPORTS: 'high-frequency-batch-exports', // owner: @tomasfarias
Expand Down
12 changes: 4 additions & 8 deletions frontend/src/scenes/authentication/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import { LemonBanner } from 'lib/lemon-ui/LemonBanner'
import { BridgePage } from 'lib/components/BridgePage/BridgePage'
import RegionSelect from './RegionSelect'
import { redirectIfLoggedInOtherInstance } from './redirectToLoggedInInstance'
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { FEATURE_FLAGS } from 'lib/constants'
import { captureException } from '@sentry/react'
import { SupportModalButton } from './SupportModalButton'

Expand Down Expand Up @@ -54,19 +52,17 @@ export function Login(): JSX.Element {
const { precheck } = useActions(loginLogic)
const { precheckResponse, precheckResponseLoading, login, isLoginSubmitting, generalError } = useValues(loginLogic)
const { preflight } = useValues(preflightLogic)
const { featureFlags } = useValues(featureFlagLogic)

const passwordInputRef = useRef<HTMLInputElement>(null)
const isPasswordHidden = precheckResponse.status === 'pending' || precheckResponse.sso_enforcement

useEffect(() => {
try {
// Turn on E2E test when this flag is removed
if (featureFlags[FEATURE_FLAGS.AUTO_REDIRECT]) {
if (preflight?.cloud) {
try {
redirectIfLoggedInOtherInstance()
} catch (e) {
captureException(e)
}
} catch (e) {
captureException(e)
}
}, [])

Expand Down

0 comments on commit 06344c7

Please sign in to comment.