在浏览器上下文中,如果有一个登录的用户,user()将返回用户数据。
user()
对于服务器端的管理,你可以通过auth.api.getUserByCookie()获得用户。
auth.api.getUserByCookie()
const user = supabase.auth.user()