mirror of
https://github.com/gethomepage/homepage.git
synced 2026-09-28 23:11:17 -07:00
Enhancement: allow OIDC auto-login (#7096)
This commit is contained in:
@@ -12,7 +12,11 @@ export default function SignOut() {
|
||||
|
||||
return (
|
||||
<div id="signout" className="rounded-full flex align-middle self-center mr-3">
|
||||
<button type="button" onClick={() => signOut({ callbackUrl: "/" })} className="outline-hidden">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => signOut({ callbackUrl: "/auth/signin?autologin=0" })}
|
||||
className="outline-hidden"
|
||||
>
|
||||
<MdLogout className="text-theme-800 dark:text-theme-200 w-6 h-6 cursor-pointer" aria-hidden="true" />
|
||||
<span className="sr-only">{t("auth.signout")}</span>
|
||||
</button>
|
||||
|
||||
@@ -32,6 +32,7 @@ describe("components/toggles/signout", () => {
|
||||
const { getByRole } = render(<SignOut />);
|
||||
fireEvent.click(getByRole("button"));
|
||||
|
||||
expect(signOut).toHaveBeenCalledWith({ callbackUrl: "/" });
|
||||
// Not "/", which would bounce straight back into the provider when auto-login is on
|
||||
expect(signOut).toHaveBeenCalledWith({ callbackUrl: "/auth/signin?autologin=0" });
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user