> ## Documentation Index
> Fetch the complete documentation index at: https://supastack.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For the full documentation corpus in one file, fetch: https://supastack.dev/llms-full.txt

# 登录与会话

在原生窗口内使用 Web 应用的账户和会话规则，包括返回应用的深链接。

## 安装与配置

桌面外壳不实现自己的登录。它在系统 WebView 中打开 Web 应用，登录发生在该源上，会话和工作区规则与浏览器一致。WebView 配置文件在多次启动之间把 Cookie 和本地存储保留在应用数据目录中。

`supastack://` 深链接方案将链接映射回同源应用路由。邀请、密码恢复和其他链接必须解析到应用提供的路径；指向其他源的链接会被忽略，而不会在特权窗口中打开。生产构建必须允许服务器发放的方案。


## 实现流程

登录、退出应用并重新打开：会话应无需第二次登录即可恢复。退出登录并重复，确认会话已消失。测试过期会话和邀请链接，然后清除应用数据目录以复现首次启动。


## 验证与排障

认证行为与 Web 应用一致。


如果你想继续完成设置，可以阅读《[测试桌面外壳](https://supastack.dev/zh/docs/desktop/testing.md)》。


## 下一篇

[测试桌面外壳](https://supastack.dev/zh/docs/desktop/testing.md)
