microsoftgraph / microsoft-graph-toolkit

Authentication Providers and UI components for Microsoft Graph 🦒
https://docs.microsoft.com/graph/toolkit/overview
Other
929 stars 291 forks source link

In the MGT playground, show scopes required by the current component configuration #1184

Open waldekmastykarz opened 3 years ago

waldekmastykarz commented 3 years ago

Proposal: In the MGT playground, show scopes required by the current component configuration

Description

The MGT playground is a great way to test components and their configuration. With the recent work around documenting scopes required by components based on the applied configuration, we could take it a step further and show which scopes are actually needed based on the currently configured components.

For example, say you added in the playground:

<mgt-login></mgt-login>

The playground shows in the list of required scopes:

Say, you added Agenda:

<mgt-login></mgt-login>
<mgt-agenda></mgt-agenda>

The list of required scopes changes to:

etc.

Rationale

Many developers struggle with auth. MGT simplifies it a lot, but unless you specify the list of scopes to consent upfront, users of your app will get a poor user experience being shown multiple consent prompts one after another, depending on the components used on the first page of your app. By helping developers to get the list of necessary scopes, we'd make it super easy for them to use MGT and correctly configure their auth provider to offer their users a great user experience.

Preferred Solution

ghost commented 3 years ago

Hello waldekmastykarz, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

nmetulev commented 3 years ago

Awesome idea @waldekmastykarz. I think this would be nice to have. I've opened this up to the community as I think this would be a good feature to be tackled.

sebastienlevert commented 1 year ago

Relates to our discussion this week @gavinbarron