cwdevteam / mesa

https://mesa-wallet.vercel.app
1 stars 1 forks source link

Add admin page #7

Closed neatonk closed 8 months ago

neatonk commented 8 months ago

\/admin\/users → Admin page for user management. (1 day)

neatonk commented 8 months ago

Much of this functionality is provided by the supabase auth control panel.

Image

neatonk commented 8 months ago

One option is to implement collaborator-only accounts account metadata:

An alternative would be to implement collaborator accounts using a separate table

neatonk commented 8 months ago

Add a new account of the specified type for the given email address. Send an email invite link to the email address.

In my testing, this is not very smooth yet. It may be necessary to update the email templates to avoid the implicit auth flow and/or support the implicit auth flow in the client. By default the invite and confirmation emails redirect back to the app with something like this, which we do not currently handle:

https://mesa-wallet.vercel.app/en#access_token=<TOKEN_HASH>&expires_at=1698556517&expires_in=3600&refresh_token=<REFRESH_TOKEN>&token_type=bearer&type=invite

See https://supabase.com/docs/guides/auth/server-side/email-based-auth-with-pkce-flow-for-ssr#update-email-templates-with-url-for-api-endpoint, for example.

neatonk commented 8 months ago

Closing in favor of using the Supabase auth dashboard to manage users. As discussed on our call today, signups will be open to all and there will be no restricted collaborator role. See #32