Skip to content

[Feature]: OIDC custom scopes #3874

@moonlight8978

Description

@moonlight8978

Feature Summary

Allow user to custom OIDC scopes for authentication

What problem does this feature solve?

I'm using Zitadel for OIDC, and I'd like to use urn:zitadel:iam:org:id:{id} as extra scope, so Zitadel can correctly show my org login page instead of the default one
https://zitadel.com/docs/apis/openidoauth/scopes

but currently, the scopes are hard-coded inside source code

Scopes: []string{oidc.ScopeOpenID, "profile", "email"},

Is there any chances of support custom scopes for OIDC? I can make a PR for it.

Proposed Solution

Support an optional environment variable like OAUTH2_SCOPES

Alternatives Considered

No response

Additional Context

No response

Checklist

  • I have searched existing issues to ensure this feature hasn't been requested before.
  • I understand that feature requests are not guaranteed to be implemented.
  • I agree to follow the project's contribution guidelines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions