authentik native change of email-claim #15
Jniklas2
started this conversation in
Show and tell
Replies: 1 comment 5 replies
Cool! So you basically used the same technique: Modifying the |
5 replies
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
For the "authentik native mailbox selector" you need to add/change some things:
Just add this block with the mailboxes, you want to be able to select:
1. Create a new prompt
Name:
Choose Mailaccount(Just choose a name you like)Field key:
attributes.mail.selected_email(You can change the part afterattributes., but then you also need to change it later on)Label:
Choose Mailaccount(Just chose a label you like, the user will see it in the end)Type: either
Radio Button Group (fixed choice)orDropdown (fixed choice)worked for me.Required:
trueInterpret placeholder as expression:
true(Important)Placeholder: (For generating the list with all options)
Interpret initial value as expression:
trueInitial value: (for automatically selecting the previously selected mailbox)
Order:
0After entering all information, you should see a preview on the right with the mailboxes that you have entered in the user or group attributes.
2.2: New Prompt stage
Name:
mailaddress-chooser(you can choose your own)Fields: Select the previously created field
Choose Mailaccount.2.1: New User Write Stage
Name:
mailcow-chosen-address(you can choose your own)User creation mode:
Never create usersI've just copied the default
default-provider-authorization-implicit-consentflow (since it's my default flow for almost all applications). You can also choose the explicit one.In the new flow I added both the
mailaddress-chooserand themailcow-chosen-addressstages.For
mailaddress-chooserI set the order to10.For
mailcow-chosen-addressI set the order to20and set theInvalid response behaviortoRESTART.Now the Stage bindings should look like this:
And the Flow Diagram should be similar to this:
Mapping Name:
mailcow-custom-mail(You can choose your own name)Scope name:
email(This is important)Expression:
Change the Authorization flow to
mailcow-authorizationIn Advanced protocol settings -> Scopes replace the default
authentik default OAuth Mapping: OpenID 'email'with our new scopemailcow-custom-emailThat should be it :)
All reactions