Skip to content
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

Support redirectUri again in a deprecated way #507

Merged
merged 2 commits into from
Feb 21, 2023
Merged

Conversation

frederikprijck
Copy link
Member

@frederikprijck frederikprijck commented Feb 16, 2023

Description

With the release of Auth0-React v2, we have renamed redirectUri to redirect_uri and moved it into an authorizationParams property bag.

This has been called out multiple times to be problematic and causing bad DX, especially since the error logging on Auth0 server doesn't point in the correct direction.

We might want to add some deprecation strategy here to help people migrate instead, to ensure we increase DX again.

Note: this only patches the constructor and loginWithRedirect. All other methods in Auth0-React v1 were using redirect_uri and never even supported redirectUri.

References

#506

Testing

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not the default branch

@frederikprijck frederikprijck requested a review from a team as a code owner February 16, 2023 15:48
* @ignore
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function deprecateRedirectUri(options?: any) {
Copy link
Member Author

@frederikprijck frederikprijck Feb 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went with any here as options.redirectUri does not exist on our types anymore.

@frederikprijck frederikprijck marked this pull request as draft February 16, 2023 15:59
@frederikprijck frederikprijck force-pushed the feat/sdk-3985 branch 2 times, most recently from e26f5a5 to c2fb386 Compare February 16, 2023 16:03
@frederikprijck frederikprijck marked this pull request as ready for review February 16, 2023 16:03
ewanharris
ewanharris previously approved these changes Feb 16, 2023
@frederikprijck frederikprijck merged commit 0ff3adc into master Feb 21, 2023
@frederikprijck frederikprijck deleted the feat/sdk-3985 branch February 21, 2023 10:19
@frederikprijck frederikprijck mentioned this pull request Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants