-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ui): added logout functionality to epic #17045
Conversation
|
||
useEffect(() => { | ||
handleSignOut() | ||
}, []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
// Utils | ||
import {isFlagEnabled} from 'src/shared/utils/featureFlag' | ||
|
||
const Logout: FC<WithRouterProps> = ({router}) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need some more types in here. try running this in influxdb/ui
:
yarn tsc -noImplicitAny | grep -A 3 -i "$(git diff --name-status master | awk '{ print substr($2,4) }')
ui/src/authorizations/apis/index.ts
Outdated
|
||
export const getAuth0Config = async (): Promise<Auth0Config> => { | ||
try { | ||
const {data} = await AJAX({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you doubling down on using the old request library for new features?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a great question. I did a global search of influxdb for /api/v2private
and followed that convention since we aren't actually generating a route for this particular endpoint on IDPE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use fetch
then to keep consistency with oats
@@ -76,6 +71,16 @@ class LoginPageContents extends PureComponent<DispatchProps> { | |||
confirmPasswordError: '', | |||
} | |||
|
|||
public async componentDidMount() { | |||
const config = await getAuth0Config() | |||
this.auth0 = auth0js.WebAuth({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dope
refactored the logout component and added in logout functionality behind a feature flag
refactored the logout component and added in logout functionality behind a feature flag
This is PR part of a larger PR that is intended to add sign-in functionality to IDPE. This particular PR deals specifically with logging out and allowing users to logout using the existing logout button