Merged in fix/sw-3627-pass-user-access-token-payment-callback (pull request #3189)
fix(SW-3627): Pass social session user token to payment callback apge * Pass social session user token to payment callback apge Approved-by: Linus Flood
This commit is contained in:
@@ -3,6 +3,8 @@ import { logger } from "@scandic-hotels/common/logger"
|
||||
|
||||
import { bookingFlowConfig } from "@/constants/bookingFlowConfig"
|
||||
|
||||
import { getSocialSession, isValidSocialSession } from "@/auth/scandic/session"
|
||||
|
||||
import type { PaymentCallbackStatusEnum } from "@scandic-hotels/common/constants/paymentCallbackStatusEnum"
|
||||
|
||||
import type { LangParams, PageArgs } from "@/types/params"
|
||||
@@ -15,12 +17,11 @@ export default async function PaymentCallbackPage(
|
||||
logger.debug(`[payment-callback] callback started`)
|
||||
const lang = params.lang
|
||||
|
||||
const userAccessToken = null
|
||||
// TODO fix when auth is implemented
|
||||
// const session = await auth()
|
||||
// if (isValidSession(session)) {
|
||||
// userAccessToken = session.token.access_token
|
||||
// }
|
||||
let userAccessToken = null
|
||||
const session = await getSocialSession()
|
||||
if (isValidSocialSession(session)) {
|
||||
userAccessToken = session.access_token
|
||||
}
|
||||
|
||||
return (
|
||||
<PaymentCallbackPagePrimitive
|
||||
|
||||
Reference in New Issue
Block a user