mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
add logout button
This commit is contained in:
@@ -493,7 +493,7 @@ export async function logout(request: NextRequest, origin: string) {
|
||||
//if there is no idToken, then sending to logout url will redirect shopify, so just
|
||||
//redirect to login here and delete cookies (presumably they don't even exist)
|
||||
if (!idTokenValue) {
|
||||
const logoutUrl = new URL(`${origin}/login`);
|
||||
const logoutUrl = new URL(`${origin}`);
|
||||
const response = NextResponse.redirect(`${logoutUrl}`);
|
||||
return removeAllCookies(response);
|
||||
}
|
||||
|
Reference in New Issue
Block a user