mirror of
https://github.com/Mastermindzh/react-starter-kit.git
synced 2025-08-23 09:35:01 +02:00
Added an example of an authentication protected page (tenders) Added an example with the built in proxy (to combat CORS) (tendersguru)
18 lines
514 B
TypeScript
18 lines
514 B
TypeScript
import { useOidc } from "@axa-fr/react-oidc";
|
|
import { FunctionComponent } from "react";
|
|
import { SSOResult } from "../models/SSOResult";
|
|
|
|
export const SessionLost: FunctionComponent<SSOResult> = ({ configurationName }) => {
|
|
const { login } = useOidc(configurationName);
|
|
|
|
return (
|
|
<>
|
|
<h1>Session timed out for {configurationName}</h1>
|
|
<p>Your session has expired. Please re-authenticate.</p>
|
|
<button type="button" onClick={() => login("/")}>
|
|
Login
|
|
</button>
|
|
</>
|
|
);
|
|
};
|