Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to use custom scopes per endpoint #128

Open
arribatec-cloud-1 opened this issue Feb 13, 2024 · 1 comment
Open

Document how to use custom scopes per endpoint #128

arribatec-cloud-1 opened this issue Feb 13, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@arribatec-cloud-1
Copy link

My app has many features and I want granular control of which features (endpoints) are available to which users.

I can currently sign on with my azure account, but how do I actually provide granular authorization?

I am able to go into Azure portal and register roles on my user but I don't know how to look at those roles in my app to provide granular access. What is the best way to do this? This should be documented.

@tomasvotava tomasvotava added the documentation Improvements or additions to documentation label Feb 19, 2024
@tomasvotava tomasvotava added this to the 1.0.0 milestone Nov 4, 2024
@tomasvotava
Copy link
Owner

tomasvotava commented Nov 4, 2024

This is actually needlessly difficult right now, the responsibility should move away from the SSOBase itself. Each openid should know its own scopes, which it doesn't, but you could try something like this:

...

sso_login = MicrosoftSSO("client_id", "client_secret", scope=["User.read"])
sso_onedrive = MicrosoftSSO("client_id", "client_secret", scope=["User.read", "Files.read.all"])

You can then use sso_onedrive to ask user for additional permissions. You will have to "remember" the scope for the user yourself, also the scopes may be nonsensical, I didn't open Microsoft's docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants