Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

🔐 feat: Enhance OpenID User Info Handling #4561

Merged
merged 10 commits into from
Oct 27, 2024
Merged

Conversation

danny-avila
Copy link
Owner

Summary

Originally #4248

  • Extracted the full name retrieval logic into a separate function getFullName for better code organization and reusability
  • Added environment variables OPENID_USERNAME_CLAIM and OPENID_NAME_CLAIM to customize which user info properties to use for username and name
  • Added detailed documentation for the getFullName function with JSDoc comments
  • Implemented extensive test coverage using MongoDB Memory Server for OpenID authentication scenarios
  • Added test cases for username handling, name retrieval, and role-based access control
  • Improved error handling for required role validation
  • Added test cases for existing user updates and role enforcement
  • Updated environment example file with new configuration options

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective
  • Local unit tests pass with my changes

@danny-avila danny-avila merged commit a1647d7 into main Oct 27, 2024
2 checks passed
@danny-avila danny-avila deleted the feat/openid-name-claims branch October 27, 2024 15:41
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants