[SDK-3548] Introduce authorizationParams to hold properties sent to Auth0 #959
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
Moves all properties that are intended to be sent to Auth0 as part of the auth process into a
authorizationParams
orlogoutParams
object.The code changes in this PR in summary:
BaseLoginOptions
has now becomeAuthorizationParams
, this holds the parameters that will be sent to the Authorization Server (Auth0) and is where custom parameters to send along also can be setBaseLoginOptions
interface was added that simply containsauthorizationParams?: AuthorizationParams
and the existing interfaces continue to extend that, with the exception ofGetTokenSilentlyOptions
which only contains a subset ofAuthorizationParams
properties by natureLogoutUrlOptions
andLogoutOptions
now contain alogoutParams
object that holds parameters to be sent to the logout endpoint, this object also supports the same custom parameters allowance likeauthorizationParams
,As a developer using the SDK, a summary is that any properties relevant to the Authorization Server (Auth0) or custom parameters that were provided now need to be moved into a
authorizationParams
object and for Logout Endpoint related parameters or again any custom parameters provided to the Logout Endpoint should now be provided in alogoutParams
object. An example (but not exhaustive) diff of these changes follows.Auth0Client
constructorcreateAuth0Client
helperThis change should also be made to the
buildAuthorizeUrl
,checkSession
,getTokenSilently
,getTokenWithPopup
login
,loginWithPopup
, andloginWithRedirect
APIs.auth0.buildLogoutUrl
auth0. logout
Checklist