Add support for client assertion signing key authentication #203
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
The
omniauth-auth0
gem only supports client secret authentication. Auth0 documentation states:Opened issue #199 on 2024-11-07 to inquire about adding support for private key JWT authentication. We created a workaround to support private key JWT authentication in our application using the
omniauth-auth0
gem. Opening this PR to get feedback on adding support for private key JWT added to the gem.This PR adds two optional parameters to the config:
The current interface is preserved. Client secret authentication can be used without changing the interface.
Client secret authentication:
Client assertion signing key:
The existing code has
rubocop
violations which were not addressed because it was outside the scope of these changes. No newrubocop
violations were introduced.References
Please include relevant links supporting this change such as a:
omniauth-auth0
gemTesting
Duplicated all the specs in
spec/omniauth/strategies/auth0_spec.rb
for client assertion signing key. The existing specs were scoped to 'client secret authentication'. All specs passed.Testing with Auth0 requires an application setup for private key JWT authentication. The public key must be uploaded to the application in Auth0.
Tested with ruby 3.2.2. Built the gem and client assertion signing key authentication with a Ruby on Rails application.
Checklist