Merged in feat/sw-3545-update-sas-userinfo-tracking (pull request #2982)

feat(SW-3545): Update partner-sas userinfo tracking

* Update loginType to eurobonus

* Remove tracking booking code properties when disabled

* Add EB user data to tracking

* Fix type issue


Approved-by: Joakim Jäderberg
This commit is contained in:
Anton Gunnarsson
2025-10-17 09:35:37 +00:00
parent c01f440651
commit 710309b7eb
17 changed files with 100 additions and 41 deletions

View File

@@ -63,7 +63,7 @@ const config: NextAuthConfig = {
throw new Error("AuthError: Missing expiry time")
}
const [eurobonusProfile, error] = await safeTry(
getEuroBonusProfileData({ accessToken, loginType: "sas" })
getEuroBonusProfileData({ accessToken, loginType: "eurobonus" })
)
if (error) {
@@ -73,7 +73,7 @@ const config: NextAuthConfig = {
return {
...params.token,
isLinked: eurobonusProfile?.linkStatus === "LINKED",
loginType: "sas",
loginType: "eurobonus",
access_token: accessToken,
expires_at: expiresAt,
}
@@ -93,7 +93,7 @@ const config: NextAuthConfig = {
}
: undefined,
token: {
loginType: "sas",
loginType: "eurobonus",
access_token: token.access_token,
expires_at: token.expires_at,
error: token.error,