mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-06 08:36:08 +08:00
fix: web app auto login
This commit is contained in:
parent
75d5f2df3c
commit
3b52ba3ba2
@ -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>
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user