Auth0-react how to handle deep linking

Please include the following information in your post:

  • Which SDK this is regarding: e.g. auth0-node
    autn0-react
  • SDK Version: e.g. 2.29.0
    1.8.0
  • Platform Version: e.g. Node 12.19.0
    v15.11.0
  • Code Snippets/Error Messages/Supporting Details/Screenshots:
import { useAuth0 } from '@auth0/auth0-react';

const LogIn = () => {
  const { handleRedirectCallback } = useAuth0();

  return handleRedirectCallback()

};

export default LogIn;

Error: Unhandled Rejection (Error): There are no query params available for parsing.

Is this a feature request or bug report? If so, please create an issue directly in the corresponding GitHub repo. The Community SDK category is for general discussion and support.

I’m trying to get a user to deep link once they have passed the login stage. If I enter https://example.com/products/list when I hit the browser, I don’t want to be redirected to https://example.com.

I’ve seen that recently handleRedirectCallback has been added to the react SDK which I am using but I can’t find any docs and good example to understand how to use with auth0-react.
I can see that it was a method available in the old auth-spa.js, but nothing for the new spa sdk.

Can u pls help? Matt