我只是在艰难地缠着这段代码。这是使用此npm模块react-native-secure-key-store
import RNSecureKeyStore, {ACCESSIBLE} from "react-native-secure-key-store";
RNSecureKeyStore.get("userID")
.then((res) => {
console.log("Logged in");
}, (err1) => {
let value1 = guidGenerator();
RNSecureKeyStore.set("userID", "value1", {accessible: ACCESSIBLE.ALWAYS_THIS_DEVICE_ONLY})
.then((genID) => {
console.log("Logged in");
}, (err) => {
console.log(err);
});
});
我只想知道这里可能出什么问题了?我是否缺少明显的东西?我可以在嵌套函数之间进行身份验证吗?