Skip to content
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

Extract user identity hook #344

Merged
merged 9 commits into from
Oct 12, 2024
Merged

Extract user identity hook #344

merged 9 commits into from
Oct 12, 2024

Conversation

mostafa
Copy link
Member

@mostafa mostafa commented Oct 11, 2024

Closes #343.

CC: @jeremylivingston Please test this and see if this solution works for you. Feel free to review it as well and provide feedback.

@jeremylivingston
Copy link

Wow, this is great. Thanks for putting this together!

Just tested it out and it appears to be working well for my use case. Just curious, is there a reason why the call to create_new_user in the library isn't supplied the user Dict as kwargs? This would simplify the creation of the new user and would prevent cases where the user is created in the create_user manager, but then fails to add other required data in the CREATE_USER trigger (something I encountered during testing).

The current solution still works well, but I was wondering if there was a reason that more data wasn't passed to the create_user call to accomplish something similar.

@mostafa
Copy link
Member Author

mostafa commented Oct 12, 2024

@jeremylivingston The idea is that the library should create a bare minimum user and then let the user (i.e. developer) set it up later.

@mostafa mostafa marked this pull request as ready for review October 12, 2024 11:08
@jeremylivingston
Copy link

Makes sense. In my situation it can sometimes result in an orphaned user if there are problems with setup. The user will get created with no team assigned and the hook attempts to assign the team. If that step fails for some reason, it means the user is unable to login since they have no password and are not assigned to the correct team.

It's not a huge deal since I can set up the necessary logging to notify us when it happens, but it would be cleaner if I could access the enriched data in the create_user step.

Thanks again for all of your help with this!

@mostafa mostafa merged commit cba317c into main Oct 12, 2024
9 checks passed
@mostafa mostafa deleted the extract-user-identity-hook branch October 12, 2024 12:22
@jeremylivingston
Copy link

Thanks again for this! Any chance you'd be willing to tag a new version containing this update?

@mostafa
Copy link
Member Author

mostafa commented Oct 13, 2024

Will do tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Access to saml_response during user creation
2 participants