@descope/node-sdk
Advanced tools
Comparing version 1.0.4-alpha.2 to 1.0.4-alpha.3
@@ -18,3 +18,3 @@ import { refreshTokenCookieName, sessionTokenCookieName } from "./constants.js"; | ||
} = resp.data; | ||
let cookie = generateCookie(sessionTokenCookieName, sessionJwt); | ||
let cookies = generateCookie(sessionTokenCookieName, sessionJwt); | ||
@@ -24,6 +24,6 @@ if (!refreshJwt) { | ||
cookie += ((_resp$response = resp.response) === null || _resp$response === void 0 ? void 0 : _resp$response.headers.get('set-cookie')) || ''; | ||
refreshJwt = getCookieValue(cookie, refreshTokenCookieName); | ||
cookies += ((_resp$response = resp.response) === null || _resp$response === void 0 ? void 0 : _resp$response.headers.get('set-cookie')) || ''; | ||
refreshJwt = getCookieValue(cookies, refreshTokenCookieName); | ||
} else { | ||
cookie += generateCookie(refreshTokenCookieName, refreshJwt); | ||
cookies += generateCookie(refreshTokenCookieName, refreshJwt); | ||
} | ||
@@ -34,3 +34,3 @@ | ||
refreshJwt, | ||
cookie | ||
cookies | ||
} | ||
@@ -37,0 +37,0 @@ }; |
{ | ||
"name": "@descope/node-sdk", | ||
"version": "1.0.4-alpha.2", | ||
"version": "1.0.4-alpha.3", | ||
"description": "Node.js library used to integrate with Descope", | ||
@@ -5,0 +5,0 @@ "typings": "./dist/index.d.ts", |
@@ -57,3 +57,3 @@ # Descope Node.js SDK | ||
```javascript | ||
const out = await clientAuth.auth.otp.verify.email(code, identifier) | ||
const out = await clientAuth.auth.otp.verify.email(identifier, code) | ||
if (out.data.cookies) { | ||
@@ -60,0 +60,0 @@ res.set('Set-Cookie', out.data.cookies) |
29329