fix: web app auto login

This commit is contained in:
NFish 2025-06-04 10:53:22 +08:00
parent 75d5f2df3c
commit 3b52ba3ba2
2 changed files with 3 additions and 2 deletions

View File

@ -12,7 +12,7 @@ export default function SignInLayout({ children }: any) {
<div className={cn('flex w-full shrink-0 flex-col rounded-2xl border border-effects-highlight bg-background-default-subtle')}>
{/* <Header /> */}
<div className={cn('flex w-full grow flex-col items-center justify-center px-6 md:px-[108px]')}>
<div className='flex flex-col md:w-[400px] lg:w-[600px]'>
<div className='flex flex-col md:w-[440px] lg:w-[600px]'>
{children}
</div>
</div>

View File

@ -25,7 +25,8 @@ export const checkOrSetAccessToken = async (appCode?: string) => {
}
if (!accessTokenJson[sharedToken]?.[userId || 'DEFAULT']) {
const res = await fetchAccessToken({ appCode: sharedToken, userId })
const webAppAccessToken = localStorage.getItem('webapp_access_token')
const res = await fetchAccessToken({ appCode: sharedToken, userId, webAppAccessToken })
accessTokenJson[sharedToken] = {
...accessTokenJson[sharedToken],
[userId || 'DEFAULT']: res.access_token,