0

I am using firebase dynamic link service to utilize dynamic linking within a react native application. I created the domain as "xyz.page.link" (where "xyz" is, of course, a different string) from the firebase console and then I created the deep link as "xyz.page.link/resetforgottenPassword"

Now I want to send a query param along with the link such as: xyz.page.link/resetforgottenPassword?forgotPasswordCode=123

where the param forgotPasswordCode will change on each new link.

I am receiving the link but not with the dynamic query parameters. I have followed react native's official docs when setting up the linking for android and iOS platforms.

The behavior I am looking for is that after tapping on the link, I am redirected to the ResetPassword screen with the dynamic query parameters, which in this case are "forgotPasswordCode: 123"

Following is the code I have employed till now:

const linking = {
  prefixes: ['https://xyz.page.link', 'xyz://'],
  config: {
    screens: {
      ResetPassword: {
        path: '/resetforgottenPassword',
      },
    },
  },
};



const handleDynamicLink = (link) => {
    // Handle dynamic link inside your own application
    link.url === 'https://thriveonthespectrum.page.link/resetforgottenPassword') {
      // ...navigate to your screen
    }
  };

the above function "handleDynamicLink" is inside App.js useEffect and linking is passed as prop to as instructed in the docs:

useEffect(() => {
    const unsubscribe = dynamicLinks().onLink(handleDynamicLink);
  }, []);
sajjad
  • 7
  • 3
  • Does this answer your question? [How do I receive query parameters from Firebase Dynamic Links using react-native-firebase?](https://stackoverflow.com/questions/62558900/how-do-i-receive-query-parameters-from-firebase-dynamic-links-using-react-native) – user18309290 Jul 21 '23 at 12:59
  • Unfortunate not. I read that answer and tried to implement it that way but to no avail. Thanks for replying, though – sajjad Jul 21 '23 at 15:33

0 Answers0