Skip to content

Commit

Permalink
fix: πŸ› bug on not clearing cache of sign in data
Browse files Browse the repository at this point in the history
  • Loading branch information
s-hirano-ist committed Oct 21, 2024
1 parent 8f1efba commit 1b6c36b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/nav/header.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"use client";
import { Button } from "@/components/ui/button";
import { DEFAULT_SIGN_IN_REDIRECT } from "@/constants";
import { signOut } from "@/features/auth/actions/sign-out";
import { useToast } from "@/hooks/use-toast";
import { Link } from "next-view-transitions";
Expand All @@ -21,7 +20,9 @@ export function Header({ title, url }: Props) {
async function onSignOutSubmit() {
const response = await signOut();
if (response.success) {
router.push(DEFAULT_SIGN_IN_REDIRECT);
// FIXME: need refresh due to sign-out non-refresh bug?
// https://github.com/nextauthjs/next-auth/issues/11125
router.refresh();
} else {
toast({
variant: "destructive",
Expand Down

0 comments on commit 1b6c36b

Please sign in to comment.