问题描述
开始使用authing,使用如下代码:
import React, { useEffect } from "react";
import { useGuard, User } from "@authing/guard-react18";
export default function App() {
const guard = useGuard();
useEffect(() => {
guard.start("#authing-guard-container").then((userInfo: User) => {
console.log("userInfo: ", userInfo);
});
}, []);
return (
<div>
<div id="authing-guard-container"></div>
</div>
);
}
报错:
guard.start is not a function
重现步骤
看这里:awesome-mountain-12vblk - CodeSandbox
附加信息
- Version:
- Platform: