-
Notifications
You must be signed in to change notification settings - Fork 430
feat: add support for backchannel authentication #2261
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
Conversation
Would it make more sense to use auth0-auth-js for CIBA now if that's what the sdk is going to end up using? |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2261 +/- ##
==========================================
- Coverage 85.39% 85.34% -0.05%
==========================================
Files 26 26
Lines 2471 2613 +142
Branches 462 481 +19
==========================================
+ Hits 2110 2230 +120
- Misses 355 377 +22
Partials 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we think that exporting openid-client polling configuration can be useful here instead of hardcoding the default config?
https://github.com/panva/openid-client/blob/main/docs/interfaces/BackchannelAuthenticationGrantPollOptions.md
Thanks for the reviews!
We might want to consider that in the future if/when the use case arises but for the time being I would say it's better to keep the surface area of the API limited.
We chatted about this and decided to rely on openid-client directly since that's what auth0-auth-js uses under the hood as well. |
📋 Changes
Adds support for Client-Initiated Backchannel Authentication. A new method
getTokenByBackchannelAuth
is exposed on the client that enables developers to initiate a backchannel authentication request and poll the token endpoint until it's complete.The
openid-client
was added to handle the polling and retry logic without having to re-implement it ourselves usingoauth4webapi
and to start moving the implementation closer to that ofauth0-auth-js
.🎯 Testing
getTokenByBackchannelAuth
method from a server route/action