magic-js icon indicating copy to clipboard operation
magic-js copied to clipboard

Get enabled OAuth providers

Open mightymatth opened this issue 3 years ago • 0 comments

✅ Prerequisites

  • [x] Did you perform a cursory search of open issues? Is this feature already requested elsewhere?
  • [x] Are you reporting to the correct repository (magic-sdk)?

✨ Feature Request

Add OAuth SDK functionality to see which OAuth provider is enabled.

🧩 Context

As I can see, there is no way to see which OAuth providers are enabled. So, in our applications, we need to dynamically maintain a list of enabled providers. That's horrible. If I've enabled, let's say Google and Facebook, I would like to be able to get this information to show Google and Facebook buttons. It's really inconvenient.

💻 Examples

Add method to OAuthExtension to get enabled providers:

export declare class OAuthExtension extends Extension.Internal<'oauth'> {
    name: "oauth";
    // ...
   getEnabledProviders(): import("magic-sdk").PromiEvent<OAuthProvider[], {
        done: (result: OAuthProvider[]) => void;
        error: (reason: any) => void;
        settled: () => void;
    }>;
}

mightymatth avatar Feb 28 '22 10:02 mightymatth

@mightymatth Our apologies for the delay in responding to this great feature request! I'll make sure this gets brought up with our Product team.

ayv8er avatar Aug 17 '22 15:08 ayv8er