diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f28f83a32..88699caae2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ 1. [18322](https://github.com/influxdata/influxdb/pull/18322): Add ability to export a stack's existing (as they are in the platform) resource state as a pkg 1. [18334](https://github.com/influxdata/influxdb/pull/18334): Update influx pkg commands with improved usage and examples in long form. 1. [18344](https://github.com/influxdata/influxdb/pull/18344): Extend influx CLI with version and User-Agent. +1. [18355](https://github.com/influxdata/influxdb/pull/18355): Integrate RedirectTo functionality so CLOUD users now get navigated back to the originally linked page after login ### Bug Fixes diff --git a/ui/src/Signin.tsx b/ui/src/Signin.tsx index c19f485117..7df6d5f103 100644 --- a/ui/src/Signin.tsx +++ b/ui/src/Signin.tsx @@ -8,7 +8,6 @@ import {client} from 'src/utils/api' // Components import {ErrorHandling} from 'src/shared/decorators/errors' import {SpinnerContainer, TechnoSpinner} from '@influxdata/clockface' -import {isFlagEnabled} from 'src/shared/utils/featureFlag' // Utils import { @@ -93,7 +92,7 @@ export class Signin extends PureComponent { clearInterval(this.intervalID) - if (CLOUD && isFlagEnabled('redirectToCloud')) { + if (CLOUD) { const url = new URL( `${window.location.origin}${CLOUD_SIGNIN_PATHNAME}?redirectTo=${ window.location.href @@ -104,12 +103,6 @@ export class Signin extends PureComponent { throw error } - if (CLOUD) { - // TODO: add returnTo to CLOUD signin - window.location.pathname = CLOUD_SIGNIN_PATHNAME - throw error - } - if (pathname.startsWith('/signin')) { return } diff --git a/ui/src/onboarding/containers/LoginPageContents.tsx b/ui/src/onboarding/containers/LoginPageContents.tsx index 003a3112ec..a0d6e8e410 100644 --- a/ui/src/onboarding/containers/LoginPageContents.tsx +++ b/ui/src/onboarding/containers/LoginPageContents.tsx @@ -22,7 +22,6 @@ import auth0js, {WebAuth} from 'auth0-js' import {LoginForm} from 'src/onboarding/components/LoginForm' import {SocialButton} from 'src/shared/components/SocialButton' import {GoogleLogo} from 'src/clientLibraries/graphics' -import {isFlagEnabled} from 'src/shared/utils/featureFlag' // Types import {Auth0Connection, FormFieldValidation} from 'src/types' @@ -63,13 +62,8 @@ class LoginPageContents extends PureComponent { public async componentDidMount() { try { - let config - if (isFlagEnabled('redirectToCloud')) { - const redirectTo = getFromLocalStorage('redirectTo') || '/' - config = await getAuth0Config(redirectTo) - } else { - config = await getAuth0Config() - } + const redirectTo = getFromLocalStorage('redirectTo') || '/' + const config = await getAuth0Config(redirectTo) this.auth0 = new auth0js.WebAuth({ domain: config.domain, clientID: config.clientID, @@ -79,10 +73,6 @@ class LoginPageContents extends PureComponent { }) } catch (error) { console.error(error) - // TODO: uncomment after demo day - // redirect to universal login page if there's an error - // window.location.href = - // 'https://auth.a.influxcloud.net/' throw error } } diff --git a/ui/src/shared/selectors/flags.ts b/ui/src/shared/selectors/flags.ts index 812ca4c58c..5daf5a3889 100644 --- a/ui/src/shared/selectors/flags.ts +++ b/ui/src/shared/selectors/flags.ts @@ -11,7 +11,6 @@ export const OSS_FLAGS = { fluxParser: false, matchingNotificationRules: false, notebooks: false, - redirectToCloud: false, telegrafEditor: false, } @@ -25,7 +24,6 @@ export const CLOUD_FLAGS = { fluxParser: false, matchingNotificationRules: false, notebooks: false, - redirectToCloud: false, telegrafEditor: false, }