mirror of
				https://github.com/steveiliop56/tinyauth.git
				synced 2025-10-31 14:15:50 +00:00 
			
		
		
		
	refactor: split app context and user context (#48)
* refactor: split app context and user context * tests: fix api tests * chore: rename dockerfiles * fix: use correct forwardauth address
This commit is contained in:
		| @@ -6,13 +6,15 @@ import { TotpForm } from "../components/auth/totp-form"; | ||||
| import { useMutation } from "@tanstack/react-query"; | ||||
| import axios from "axios"; | ||||
| import { notifications } from "@mantine/notifications"; | ||||
| import { useAppContext } from "../context/app-context"; | ||||
|  | ||||
| export const TotpPage = () => { | ||||
|   const queryString = window.location.search; | ||||
|   const params = new URLSearchParams(queryString); | ||||
|   const redirectUri = params.get("redirect_uri") ?? ""; | ||||
|  | ||||
|   const { totpPending, isLoggedIn, title } = useUserContext(); | ||||
|   const { totpPending, isLoggedIn } = useUserContext(); | ||||
|   const { title } = useAppContext(); | ||||
|  | ||||
|   if (isLoggedIn) { | ||||
|     return <Navigate to={`/logout`} />; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Stavros
					Stavros