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

Initial attempt at testing openidStrategy and adding OPENID_USERNAME_CLAIM setting #4248

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

alihacks
Copy link

@alihacks alihacks commented Sep 25, 2024

Summary

Adding tests for openidStrategy and additional configuration for openid username and name claims. This is an early PR for feedback, I will be implementing more tests and configuration - would like feedback early on before proceeding.

Change Type

Please delete any irrelevant options.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Translation update

Testing

Test with local OIDC provider and jest tests.

Test Configuration:

Checklist

Please delete any irrelevant options.

  • 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 or that my feature works
  • Local unit tests pass with my changes
  • A pull request for updating the documentation has been submitted.

@danny-avila
Copy link
Owner

Thanks for doing this! You can also use mongodb-memory-server for the database operations, see an example in api/models/Role.spec.js

@alihacks
Copy link
Author

alihacks commented Sep 26, 2024

Updated tests to use mongodb-memory-server - it did change behavior a little as it was lowercasing username based on the schema.

@danny-avila
Copy link
Owner

danny-avila commented Oct 10, 2024

can you also add documentation for this and the other PR? https://github.com/LibreChat-AI/librechat.ai

@alihacks
Copy link
Author

can you also add documentation for this and the other PR? https://github.com/LibreChat-AI/librechat.ai

Sure - I had a question about where the doc for additional OIDC config should live. They're not provider specific but it seems all the generic options are documented under keycloak - is that where you want these documented?

@danny-avila
Copy link
Owner

Sure - I had a question about where the doc for additional OIDC config should live. They're not provider specific but it seems all the generic options are documented under keycloak - is that where you want these documented?

Any help to the end of making a generic page is appreciated.

I will push all your changes with the next release cycle.

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.

2 participants