identity.status()
返回用户是否已在本应用上下文完成平台登录,不返回任何身份资料。
Syntax
const { authenticated } = await host.identity.status();
Return value
{ authenticated: boolean }
Examples
const state = await host.identity.status();
renderAccountControls(state.authenticated);
Privacy
不返回全局 ID、每应用 ID、显示名、email、头像或 token。返回值属于 app-context。
Errors
平台暂不可用时返回 platform-unavailable;不能用伪造的 { authenticated: false } 掩盖协议错误。
Requirements
- 能力:
host:identity.status - 用户激活:不需要
- 信任档位:green