feat(makelore): add platform oidc login

This commit is contained in:
brother7 committed 2026-10-10 17:29:33 +08:00
1 parent 87d3f03d75
commit 7236def07d
12 files changed
+528 -10

No files matched your search

+8 -1
View File
@@ -284,7 +284,14 @@ function App() {
useEffect(() => {
const unsubscribe = subscribeHostEvent('auth:session-changed', (session) => {
useAuthStore.getState().applyMainSession(session);
const auth = useAuthStore.getState();
auth.applyMainSession(session);
// A platform OIDC callback is committed by Main and only carries the
// session credentials. Reload the current account so the renderer gets
// the stable username and module permissions before routing.
if (session) {
void auth.init().catch(() => undefined);
}
});
return unsubscribe;
}, []);