mirror of
https://github.com/Mastermindzh/react-starter-kit.git
synced 2025-08-23 09:35:01 +02:00
Added react-oidc (use demo/demo)
Added an example of an authentication protected page (tenders) Added an example with the built in proxy (to combat CORS) (tendersguru)
This commit is contained in:
17
src/infrastructure/sso/overrides/SessionLost.tsx
Normal file
17
src/infrastructure/sso/overrides/SessionLost.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
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>
|
||||
</>
|
||||
);
|
||||
};
|
Reference in New Issue
Block a user