feat: add support for backchannel authentication#2261
feat: add support for backchannel authentication#2261tusharpandey13 merged 6 commits intoauth0:mainfrom
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:
|
tusharpandey13
left a comment
There was a problem hiding this comment.
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
getTokenByBackchannelAuthis exposed on the client that enables developers to initiate a backchannel authentication request and poll the token endpoint until it's complete.The
openid-clientwas added to handle the polling and retry logic without having to re-implement it ourselves usingoauth4webapiand to start moving the implementation closer to that ofauth0-auth-js.🎯 Testing
getTokenByBackchannelAuthmethod from a server route/action