Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

signinwithemail link error using react-native, Firebase and expo

Error encountered This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled. I am trying to use signin with email link in firebase and React Apllication build using EXPO when i run this code i get the email link but when i click on that link i get this error My code is

  const actionCodeSettings = {
    url: ` https://servy-a8ef2.firebaseapp.com`,
    handleCodeInApp: true,
  };
  await firebase
    .auth()
    .sendSignInLinkToEmail(email, actionCodeSettings)
    .then(function () {
     
    })
    .catch(function (error) {
      console.log("error", error);
      // Some error occurred, you can inspect the code: error.code
    });
like image 678
Noman Baig Avatar asked Feb 24 '26 15:02

Noman Baig


1 Answers

I don’t know if it’s still relevant, I had the same error. Maybe for someone it will be useful.

First of all, check your link, there is a space before https, firebase may encode it as "%20https..." That’s why it does not work. And check your quotes as well, the back quotes can be encoded differently.

I had problem with an environmental variable, i put the value with quotes, that google encoded as "%27http......%27". So that was my error.

like image 139
olga Avatar answered Feb 26 '26 04:02

olga



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!