Skip to content

Create a User based on a role #192

Answered by Podolyan98
Podolyan98 asked this question in Q&A
Discussion options

You must be logged in to vote

Solved this using a custom pipeline:

def create_profile(backend, user, *args, **kwargs):
    roles = kwargs.get('response').get('realm_access').get('roles')
    if 'support' in roles:
        Support.objects.get_or_create(user=user)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Podolyan98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant