Skip to content

How to create email, and profile scope (previously built in) #3389

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

Closed
Bhautik0110 opened this issue Aug 8, 2022 · 2 comments
Closed

How to create email, and profile scope (previously built in) #3389

Bhautik0110 opened this issue Aug 8, 2022 · 2 comments
Labels
question Further information is requested

Comments

@Bhautik0110
Copy link
Contributor

Question

How do create/restore the old scope (profile, and email) scope, which is come before version 2022.7, I have restored email scope using property mapping but how can I add profile scope?

Deployment

  • Method: docker-compose
  • Version: 2022.7
@Bhautik0110 Bhautik0110 added the question Further information is requested label Aug 8, 2022
@davidus05
Copy link

As you already know how to add scopes, I can provide you with some code. profile scope has following expression, maybe this helps:

authentik default OAuth Mapping: OpenID 'profile'

return {
    # Because authentik only saves the user's full name, and has no concept of first and last names,
    # the full name is used as given name.
    # You can override this behaviour in custom mappings, i.e. `request.user.name.split(" ")`
    "name": request.user.name,
    "given_name": request.user.name,
    "family_name": "",
    "preferred_username": request.user.username,
    "nickname": request.user.username,
    # groups is not part of the official userinfo schema, but is a quasi-standard
    "groups": [group.name for group in request.user.ak_groups.all()],
}

image

@sevmonster
Copy link
Contributor

sevmonster commented Sep 14, 2022

All default authentik values including scopes are now provided via blueprints. For any tenants with modified settings the blueprints are not enabled automatically. Enable the relevant blueprint and you will get them back.

https://goauthentik.io/docs/releases/2022.8#new-features

@BeryJu BeryJu closed this as completed Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants