feat(makelore): add platform oidc login
This commit is contained in:
1 parent
87d3f03d75
commit
7236def07d
12 files changed
+528
-10
No files matched your search
+8
-1
@@ -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;
|
||||
}, []);
|
||||
|
||||
Reference in new issue
Block a user