[英]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.
“location.protocol”必须是 http、https 或 chrome-extension,并且必须启用网络存储。 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
我正在尝试在 firebase 中使用带有电子邮件链接的登录,并在运行此代码时使用 EXPO 构建 React Application,我收到电子邮件链接,但是当我单击该链接时,我收到此错误我的代码是
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
});
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.首先,检查您的链接,https 前有一个空格,firebase 可能会将其编码为“%20https...”,这就是它不起作用的原因。 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".我有一个环境变量的问题,我把这个值用引号括起来,谷歌编码为“%27http......%27”。 So that was my error.
所以这是我的错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.