mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-16 16:26:16 +02:00
core/authenticate: refactor idp sign out (#4582)
This commit is contained in:
parent
7211a8d819
commit
a0c92896ef
16 changed files with 318 additions and 93 deletions
|
@ -57,6 +57,8 @@ const Header: FC<HeaderProps> = ({ includeSidebar, data }) => {
|
|||
get(data, "user.claims.picture") ||
|
||||
get(data, "profile.claims.picture") ||
|
||||
null;
|
||||
const showAvatar =
|
||||
data?.page !== "SignOutConfirm" && data?.page !== "SignedOut";
|
||||
|
||||
const handleDrawerOpen = () => {
|
||||
setDrawerOpen(true);
|
||||
|
@ -122,9 +124,11 @@ const Header: FC<HeaderProps> = ({ includeSidebar, data }) => {
|
|||
</a>
|
||||
)}
|
||||
<Box flexGrow={1} />
|
||||
<IconButton color="inherit" onClick={handleMenuOpen}>
|
||||
<Avatar name={userName} url={userPictureUrl} />
|
||||
</IconButton>
|
||||
{showAvatar && (
|
||||
<IconButton color="inherit" onClick={handleMenuOpen}>
|
||||
<Avatar name={userName} url={userPictureUrl} />
|
||||
</IconButton>
|
||||
)}
|
||||
<Menu
|
||||
onClose={handleMenuClose}
|
||||
anchorOrigin={{
|
||||
|
|
16
ui/src/components/SignedOutPage.tsx
Normal file
16
ui/src/components/SignedOutPage.tsx
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { Alert } from "@mui/material";
|
||||
import Container from "@mui/material/Container";
|
||||
import React, { FC } from "react";
|
||||
import { SignedOutPageData } from "src/types";
|
||||
|
||||
type SignedOutPageProps = {
|
||||
data: SignedOutPageData;
|
||||
};
|
||||
const SignedOutPage: FC<SignedOutPageProps> = ({ data }) => {
|
||||
return (
|
||||
<Container>
|
||||
<Alert color="info">User has been logged out.</Alert>
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
export default SignedOutPage;
|
Loading…
Add table
Add a link
Reference in a new issue