diff --git a/src/frontend.tsx b/src/frontend.tsx index db83ea6..f1e0a0f 100644 --- a/src/frontend.tsx +++ b/src/frontend.tsx @@ -13,14 +13,17 @@ import { RouterProvider } from "react-router"; import { LogtoProvider, type LogtoConfig } from '@logto/react'; import { route } from "./routes"; import { LOGTO_RESOURCE } from "./utils/constants"; -import { LOGTO_DOMAIN } from "./utils/common"; +import { LOGTO_APPID, LOGTO_DOMAIN } from "./utils/common"; const elem = document.getElementById("root")!; const config: LogtoConfig = { endpoint: LOGTO_DOMAIN, - appId: 'iq0oceaeqazpcned7hzil', + appId: LOGTO_APPID, resources: [LOGTO_RESOURCE], + scopes: [ + 'admin', + ] }; const app = ( diff --git a/src/page/UserCenter.tsx b/src/page/UserCenter.tsx index b15c51e..c67924e 100644 --- a/src/page/UserCenter.tsx +++ b/src/page/UserCenter.tsx @@ -20,7 +20,7 @@ const redirect = encodeURIComponent(USER_CENTER_URL); export const UserCenter = () => { const { signIn, isAuthenticated, signOut, getIdTokenClaims } = useLogto(); - const { isAuthExpired, autoSignIn } = useAutoLogin(); + const { autoSignIn } = useAutoLogin(); const [user, setUser] = useState(); const navigate = useNavigate(); const location = useLocation(); @@ -75,13 +75,11 @@ export const UserCenter = () => { - {isAuthExpired && ( - - - - )} + + +