fix(chat): redirect unauthenticated users from chat
This commit is contained in:
@@ -34,6 +34,8 @@ interface AuthState {
|
||||
errorMessage: string | null;
|
||||
/** 当前登录状态(未登录 / 游客 / OAuth / 邮箱) */
|
||||
loginStatus: MachineContext["loginStatus"];
|
||||
/** 启动时的本地登录态恢复是否已经完成 */
|
||||
hasInitialized: MachineContext["hasInitialized"];
|
||||
/**
|
||||
* 一次性的"刚按了"信号 —— Skip / Facebook / 邮箱登录按钮派完业务事件后置 true,
|
||||
* splash-screen / auth-screen 看到 `pendingRedirect && loginStatus !== "notLoggedIn"`
|
||||
@@ -67,12 +69,14 @@ export function AuthProvider({ children }: AuthProviderProps) {
|
||||
state.matches("loadingEmailLogin") ||
|
||||
state.matches("loadingEmailRegister") ||
|
||||
state.matches("loadingOAuth") ||
|
||||
state.matches("initializing") ||
|
||||
state.matches("loggingOut") ||
|
||||
state.matches("syncingGoogleBackend") ||
|
||||
state.matches("syncingFacebookBackend") ||
|
||||
state.matches("loadingGuestLogin"),
|
||||
errorMessage: state.context.errorMessage,
|
||||
loginStatus: state.context.loginStatus,
|
||||
hasInitialized: state.context.hasInitialized,
|
||||
pendingRedirect: state.context.pendingRedirect,
|
||||
}),
|
||||
[state],
|
||||
|
||||
Reference in New Issue
Block a user