Skip to content

Fix logout behavior – redirect to login when session expires #760

Answered by kausik10
kausik10 asked this question in Support
Discussion options

You must be logged in to vote

Hi,

I looked into the identity.tsx and found that the previous codebase didn't have a crucial detail.

import { IdentityState} from "@contember/react-identity";
import { Loader } from "../ui/loader";
import { dict } from "../dict";


export const IdentityLoader = ({ children }: { children: React.ReactNode }) => {
    return (
        <>
            <IdentityState state={["loading", "none", "cleared"]}>
                <Loader />
            </IdentityState>
        
            <IdentityState state={"failed"}>
               
                            <p className="text-center text-lg text-gray-600">
                                {dict.identityLoader.fail}
                            </p>

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@kausik10
Comment options

@jonasnobile
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by kausik10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants