usebasejump / basejump

Teams, personal accounts, permissions and billing for your Supabase app
https://usebasejump.com
MIT License
673 stars 63 forks source link

get_personal_account doesn't include email #61

Open ianschmitz opened 8 months ago

ianschmitz commented 8 months ago

The example on this page shows the page accessing data.email from the get_personal_account RPC response: https://usebasejump.com/docs/react/user-account-button. For context i'm using the RSC example.

When in fact the response does not contain email. Here's an example response:

{
  account_id: '3360b947-c0d2-4873-a145-64d5f6e399cf',
  account_role: 'owner',
  is_primary_owner: true,
  name: 'ian',
  slug: null,
  personal_account: true,
  billing_enabled: true,
  billing_status: null,
  created_at: '2024-01-11T00:02:55.986862+00:00',
  updated_at: '2024-01-11T00:02:55.986862+00:00',
  metadata: {}
}

Which matches the API docs: https://usebasejump.com/docs/accounts#retrieve-personal-account. My understanding is "Account" refers to a grouping of users, in which case it makes sense that email isn't included.

tiniscule commented 8 months ago

I've got a Basejump update that adds email to the personal account - I'm not able to release it until the newest dbdev version drops from Supabase however. Going to leave this open until I get a chance to get the update resolved.

You're right that this is a bit more of a convenience item for personal_accounts, it's in no way critical that it gets returned since you already have access to it through Supabase directly. It just saves me a request when rendering the user profile button 😬

la289 commented 6 months ago

Any idea when this update might come through?