fix: ensure authorization_details can be passed in as array instead of only string #1111
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
This PR ensures we can pass
authorization_details
as an array instead of only a string.Additionally, the
authorization_details
are not returned as a string, but as an actual array.This PR fixes those types, and implements it using Generics so that users can provide their own type of
AuthorizationDetails
(which will most often be the case).This has been fixed for both CIBA+RAR and PAR+RAR.
References
https://auth0.com/docs/get-started/authentication-and-authorization-flow/client-initiated-backchannel-authentication-flow/user-authorization-with-ciba
Testing
To test this, simply do a CIBA+RAR exchange and inspect the returned
authorization_details
(even before this change, it's marked as a string but it's actually an object at run time.Checklist