Skip to content

How to get email in Bearer JWT token #652

@hippie131

Description

@hippie131

This app is awesome! I got it working with auth mode for dovecot but I'd really like to use local mode instead.

When I use local mode, I get this error in dovecot:

Local validation failed: No username returned

I have my dovecot server setup so it can handle more then one domain so I use full email addresses as the usernames for dovecot. When I setup oidc, the email field isn't in the JWT bearer token which causes dovecot to fail with that error. I am requesting the email scope (actually I have it set to openid profile email offline_access in my email client app) and I've also tried adding a custom claim to return email but that doesn't seem to have any influence on the generated bearer JWT token. The only usable field in it is "sub" but that's just the nextcloud username, not the full email address.

Is there a way to add more fields included in the generated JWT bearer token at all?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions