getUser()
Signature
massi.auth.getUser(): Promise<{ data: { user: User | null }; error: MassiError | null }>Example
const { data: { user }, error } = await massi.auth.getUser()
if (!user) { console.log('Not signed in')} else { console.log('Signed in as:', user.email)}Notes
- Returns
nullforuserif there is no active session. - This call hits the server to validate the token — use
getSession()for a local-only read that avoids the network round-trip.