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

feat(oauth): support multiple oidc providers #6

Merged
merged 4 commits into from
Feb 7, 2025

Conversation

cmackenzie1
Copy link
Owner

No description provided.

This changes from `TypeId` to named strings for registering plugins, allowing users to then provide multiple oidc providers by calling `with_oidc_provider` for each provider.
This commit does a few things:

- Simplified `create_user` method in Torii with a more direct email/password signature
- Removed unused authentication-related enums (`AuthMethod`, `AuthenticationRequest`, `CreateUserParams`)
- Updated OIDC plugin to use the new `Storage` wrapper consistently
- Improved documentation with more detailed examples
- Updated test cases to reflect the new method signatures
Adding method that will create a new user for a given oidc connection if
one does not already exist.
@cmackenzie1 cmackenzie1 changed the title feat: support multiple social providers feat(oauth): support multiple social providers Feb 7, 2025
@cmackenzie1 cmackenzie1 changed the title feat(oauth): support multiple social providers feat(oauth): support multiple oidc providers Feb 7, 2025
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 88.14229% with 30 lines in your changes missing coverage. Please review.

Project coverage is 70.37%. Comparing base (79c8c43) to head (3ee96a3).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
torii-auth-oidc/src/lib.rs 59.42% 28 Missing ⚠️
torii-core/src/plugin.rs 91.66% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main       #6       +/-   ##
===========================================
+ Coverage   58.13%   70.37%   +12.23%     
===========================================
  Files           9        9               
  Lines        1125     1259      +134     
===========================================
+ Hits          654      886      +232     
+ Misses        471      373       -98     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cmackenzie1 cmackenzie1 merged commit 8702fb8 into main Feb 7, 2025
3 checks passed
@cmackenzie1 cmackenzie1 deleted the cole/multiple-social-providers branch February 7, 2025 01:00
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.

1 participant