Allow querying enabled login methods from Management API #19157
Unanswered
eagerestwolf
asked this question in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi there,
So I am creating an app with Supabase that is intended to be deployed by businesses on their own infrastructure (or Cloudflare, Vercel, or the like since it's a regular SvelteKIt application). As such, while I am creating the authentication UI I'm finding it would be very handy to be able to query which login methods are enabled on the Supabase backend. Currently, the application is configured to read which login providers are enabled from an environment variable and load the appropriate buttons onto the login page. However, that could be eliminated if I had access to a list of enabled methods from Supabase itself. Obviously, this is something that you wouldn't want to expose to literally everyone, so I feel that the Management API would probably be the appropriate place to handle this. Alternatively, it would be nice if the
@supabase/supabase-jshad a simple list of what is enabled or disabled. For example:could return
There obviously would be no need to expose the settings (both for security and posterity reasons), since for SAML for example, that information could be obtained from the database via Prisma or something. The real sticking point is the social providers since they are the difficult ones. This obviously wouldn't fix everything since we don't know what scopes the user would like, but it's at least a start. This would also help the Supabase team with their own Auth UI since the developer would no longer need to pass the social providers in manually. Ultimately, the Management API is probably the way to go, so that everything could be passed down since the request is authenticated; but I think adding the enabled providers to the JavaScript API would be nice, so that way everyone developing SPAs could benefit from this as well.
All reactions