Can sign out
This commit is contained in:
		geneit_app/src
@@ -1,6 +1,6 @@
 | 
			
		||||
import { Button, CircularProgress } from "@mui/material";
 | 
			
		||||
import { useEffect, useRef, useState } from "react";
 | 
			
		||||
import { Link, useSearchParams } from "react-router-dom";
 | 
			
		||||
import { Link, useNavigate, useSearchParams } from "react-router-dom";
 | 
			
		||||
import { AuthApi } from "../../api/AuthApi";
 | 
			
		||||
import { useSetAtom } from "jotai";
 | 
			
		||||
 | 
			
		||||
@@ -9,6 +9,7 @@ import { useSetAtom } from "jotai";
 | 
			
		||||
 */
 | 
			
		||||
export function OIDCCbRoute(): React.ReactElement {
 | 
			
		||||
  const setAuth = useSetAtom(AuthApi.authStatus);
 | 
			
		||||
  const navigate = useNavigate();
 | 
			
		||||
 | 
			
		||||
  const [error, setError] = useState(false);
 | 
			
		||||
 | 
			
		||||
@@ -27,6 +28,7 @@ export function OIDCCbRoute(): React.ReactElement {
 | 
			
		||||
        count.current = code!;
 | 
			
		||||
 | 
			
		||||
        await AuthApi.FinishOpenIDLogin(code!, state!);
 | 
			
		||||
        navigate("/");
 | 
			
		||||
        setAuth(true);
 | 
			
		||||
      } catch (e) {
 | 
			
		||||
        console.error(e);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user