-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add loggout page, implement legacy login/out redirect
- Loading branch information
Showing
6 changed files
with
145 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
import { | ||
Box, | ||
Button, | ||
Container, | ||
Paper, | ||
Stack, | ||
Typography, | ||
} from '@mui/material'; | ||
import { useCheckLoggedIn } from './LogIn'; | ||
import orcidLogo from '../../common/assets/orcid.png'; | ||
import globusLogo from '../../common/assets/globus.png'; | ||
import googleLogo from '../../common/assets/google.webp'; | ||
import classes from './LogIn.module.scss'; | ||
|
||
export const LoggedOut = () => { | ||
useCheckLoggedIn(undefined); | ||
|
||
return ( | ||
<Container maxWidth="sm"> | ||
<Stack spacing={2} textAlign="center"> | ||
<Paper | ||
elevation={0} | ||
sx={{ | ||
padding: 2, | ||
}} | ||
> | ||
<Stack spacing={2}> | ||
<Typography variant="h4" component="h1"> | ||
You are signed out of KBase | ||
</Typography> | ||
<Typography fontStyle="italic"> | ||
You may still be logged in to your identity provider. If you wish | ||
to ensure that your KBase account is inaccessible from this | ||
browser, you should sign out of any provider accounts you have | ||
used to access KBase. | ||
</Typography> | ||
<Box className={classes['separator']} /> | ||
<Stack spacing={1}> | ||
<Button | ||
role="link" | ||
href="https://www.orcid.org/signout" | ||
variant="outlined" | ||
color="base" | ||
size="large" | ||
startIcon={ | ||
<img | ||
src={orcidLogo} | ||
alt="ORCID logo" | ||
className={classes['sso-logo']} | ||
/> | ||
} | ||
> | ||
Log out from ORCID | ||
</Button> | ||
<Button | ||
role="link" | ||
href="https://accounts.google.com/Logout" | ||
variant="outlined" | ||
color="base" | ||
size="large" | ||
startIcon={ | ||
<img | ||
src={googleLogo} | ||
alt="Google logo" | ||
className={classes['sso-logo']} | ||
/> | ||
} | ||
> | ||
Log out from Google | ||
</Button> | ||
<Button | ||
role="link" | ||
href="https://app.globus.org/logout" | ||
variant="outlined" | ||
color="base" | ||
size="large" | ||
startIcon={ | ||
<img | ||
src={globusLogo} | ||
alt="Globus logo" | ||
className={classes['sso-logo']} | ||
/> | ||
} | ||
> | ||
Log out from Globus | ||
</Button> | ||
</Stack> | ||
</Stack> | ||
</Paper> | ||
</Stack> | ||
</Container> | ||
); | ||
}; |