fix: passport outdate caused webapp reload (#27175)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -30,14 +30,8 @@ type isWebAppLogin = {
|
||||
app_logged_in: boolean
|
||||
}
|
||||
|
||||
export async function webAppLoginStatus(enabled: boolean, shareCode: string) {
|
||||
if (!enabled) {
|
||||
return {
|
||||
userLoggedIn: true,
|
||||
appLoggedIn: true,
|
||||
}
|
||||
}
|
||||
|
||||
export async function webAppLoginStatus(shareCode: string) {
|
||||
// always need to check login to prevent passport from being outdated
|
||||
// check remotely, the access token could be in cookie (enterprise SSO redirected with https)
|
||||
const { logged_in, app_logged_in } = await getPublic<isWebAppLogin>(`/login/status?app_code=${shareCode}`)
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user