create-kywi-app 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/templates.mjs +2 -2
- package/package.json +1 -1
package/lib/templates.mjs
CHANGED
|
@@ -1962,7 +1962,7 @@ function apiRoute() {
|
|
|
1962
1962
|
return `import { NextRequest, NextResponse } from 'next/server'
|
|
1963
1963
|
import { getKywiHandler } from '../../../../lib/kywi'
|
|
1964
1964
|
import {
|
|
1965
|
-
|
|
1965
|
+
isTokenIssuingPath,
|
|
1966
1966
|
parseSessionTokens,
|
|
1967
1967
|
setAccessCookie,
|
|
1968
1968
|
setRefreshCookie,
|
|
@@ -1993,7 +1993,7 @@ async function handleRequest(
|
|
|
1993
1993
|
return out
|
|
1994
1994
|
}
|
|
1995
1995
|
|
|
1996
|
-
if (
|
|
1996
|
+
if (isTokenIssuingPath(path) && res.ok) {
|
|
1997
1997
|
const bodyText = await res.text()
|
|
1998
1998
|
const { accessToken, refreshToken } = parseSessionTokens(bodyText)
|
|
1999
1999
|
const out = new NextResponse(bodyText, { status: res.status, headers: res.headers })
|
package/package.json
CHANGED