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

feature request: wildcard scope for organization token #6653

Open
broncha opened this issue Oct 6, 2024 · 1 comment
Open

feature request: wildcard scope for organization token #6653

broncha opened this issue Oct 6, 2024 · 1 comment
Labels

Comments

@broncha
Copy link

broncha commented Oct 6, 2024

What problem did you meet?

you have to enumerate all the permissions in the idtoken request config in order to have the scopes in the organization token.

Describe what you'd like Logto to have

scopes in organization token are only available when the permissions are included as scope in the initial config

const config: LogtoConfig = {
  endpoint: "http://localhost:3001/",
  appId: "i41kwordgyyl7r17xlr6o",
  scopes: [
    UserScope.Email,
    UserScope.Phone,
    UserScope.CustomData,
    UserScope.Identities,
    UserScope.Organizations,
    UserScope.OrganizationRoles,
    "read:orders"
  ]
};

If read:orders is not included, the organization token created using getOrganizationToken does not contain the scope field. Which is a bit useless in terms of a multi tenacy app, where we planned on using for org scoped requests. To get the permissions in the backend, we would need to make an extra api call to logto.
And since we have a lot of permissions, it is a bit impractical to enumerate all those permissions in the config. Only specifying read and write also does not work (similar to what is documented for resources access token)

It would be great to be able to specify wildcard scopes in the config, like read:*, write:*

Copy link

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant