feat: handle ecid and loginType params from mobile app

This commit is contained in:
Christel Westerberg
2024-08-20 13:23:55 +02:00
parent 4a07ca3cd9
commit 855713565e
5 changed files with 66 additions and 7 deletions

View File

@@ -44,6 +44,7 @@ export function createContext() {
const cookie = cookies()
const webviewTokenCookie = cookie.get("webviewToken")
const loginType = h.get("loginType")
return createContextInner({
auth: async () => {
@@ -53,7 +54,12 @@ export function createContext() {
return null
}
return session || ({ token: { access_token: webToken } } as Session)
return (
session ||
({
token: { access_token: webToken, loginType },
} as Session)
)
},
lang: h.get("x-lang") as Lang,
pathname: h.get("x-pathname")!,