Interface: AuthObservers
Tracks the active embed session for custom account controls.
Use user to keep the account menu current without repeating an on-demand lookup.
Example
const user = window.mimeeqApp.observers.auth.user;
const subscription = user.subscribe(({ newValue }) => console.log(newValue?.id));
window.addEventListener('pagehide', () => subscription.unsubscribe(), { once: true });
Properties
user
user:
StateObservable<Nullable<EmbedAuthUser>>
Reports the active signed-in user profile.
Emits immediately. A null value means no profile is available, including before sign-in and after sign-out.
Use authorization.getUserData() for the existing on-demand lookup.
Example
const user = window.mimeeqApp.observers.auth.user.getValue();
console.log(user?.name || user?.email || 'Guest');