Skip to main content
Glama
route.ts757 B
import { createClient } from '@/lib/supabase/server' import { NextResponse } from 'next/server' /** * Auth Signout Route Handler * * Handles user signout by clearing the Supabase session * and redirecting to the login page */ export async function POST(request: Request) { const requestUrl = new URL(request.url) const supabase = await createClient() // Sign out the user const { error } = await supabase.auth.signOut() if (error) { console.error('Error signing out:', error) return NextResponse.redirect( new URL(`/dashboard?error=${encodeURIComponent(error.message)}`, requestUrl.origin) ) } // Redirect to login page after successful signout return NextResponse.redirect(new URL('/login', requestUrl.origin)) }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/darrentmorgan/hostaway-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server