Mam*_*hid 9 firebase react-native firebase-authentication expo
我正在尝试使用 React Native 和 Expo 中的电子邮件链接通过 Firebase 进行身份验证。这是我的代码
const actionCodeSettings = {
url: 'ndimensions-9c677.web.app',
handleCodeInApp: true,
};
emailAuth: async (email) => {
try {
firebase.auth().sendSignInLinkToEmail(email, actionCodeSettings)
.then(() => {
// The link was successfully sent. Inform the user.
// Save the email locally so you don't need to ask the user for it again
// if they open the link on the same device.
window.localStorage.setItem('emailForSignIn', email);
// ...
})
.catch((error) => {
const errorCode = error.code;
const errorMessage = error.message;
console.log(errorCode, errorMessage);
// ...
});
} catch (error) {
console.log('Something went wrong with Email Link Authentication: ', error);
}
},
Run Code Online (Sandbox Code Playgroud)
我收到错误:auth/invalid-continue-uri continue url 中缺少域 url 的值应该是多少?
| 归档时间: |
|
| 查看次数: |
5257 次 |
| 最近记录: |