diff --git a/docs/embedding/sdk/authentication.md b/docs/embedding/sdk/authentication.md
index 699c01ac6b1ff9ac4a5363e4acaba199b30428d9..f901fb4cd6b1b28dab1f9295312c853cc3a39467 100644
--- a/docs/embedding/sdk/authentication.md
+++ b/docs/embedding/sdk/authentication.md
@@ -52,9 +52,10 @@ async function metabaseAuthHandler(req, res) {
 
   try {
     const response = await fetch(ssoUrl, { method: "GET" });
-    const token = await response.json();
+    const session = await response.text();
 
-    return res.status(200).json(token);
+    console.log("Received session", session);
+    return res.status(200).set("Content-Type", "application/json").end(session);
   } catch (error) {
     if (error instanceof Error) {
       res.status(401).json({