chore(redirectTo-flag): removed redirectTo featureFlag (#18355)

pull/18365/head
Ariel Salem 2020-06-04 05:24:26 -07:00 committed by GitHub
parent 1bfd6d0827
commit 22e135c06a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 22 deletions

View File

@ -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

View File

@ -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<Props, State> {
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<Props, State> {
throw error
}
if (CLOUD) {
// TODO: add returnTo to CLOUD signin
window.location.pathname = CLOUD_SIGNIN_PATHNAME
throw error
}
if (pathname.startsWith('/signin')) {
return
}

View File

@ -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<DispatchProps> {
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<DispatchProps> {
})
} 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
}
}

View File

@ -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,
}