@thinkingcat/auth-utils 1.0.9 → 1.0.10
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/README.md +26 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ npm install @thinkingcat/auth-utils
|
|
|
60
60
|
```json
|
|
61
61
|
{
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@thinkingcat/auth-utils": "^1.0.
|
|
63
|
+
"@thinkingcat/auth-utils": "^1.0.10"
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
```
|
|
@@ -775,6 +775,7 @@ return new NextResponse(html, {
|
|
|
775
775
|
- `isProduction`: 프로덕션 환경 여부 (기본값: false)
|
|
776
776
|
- `cookieDomain`: 쿠키 도메인 (선택)
|
|
777
777
|
- `serviceId`: 서비스 ID (필수)
|
|
778
|
+
- `licenseKey`: 라이센스 키 (필수)
|
|
778
779
|
|
|
779
780
|
**반환값:**
|
|
780
781
|
|
|
@@ -791,7 +792,8 @@ const response = await createAuthResponse(accessToken, secret, {
|
|
|
791
792
|
cookiePrefix: "myservice",
|
|
792
793
|
isProduction: process.env.NODE_ENV === "production",
|
|
793
794
|
cookieDomain: process.env.COOKIE_DOMAIN,
|
|
794
|
-
serviceId: "myservice",
|
|
795
|
+
serviceId: "myservice",
|
|
796
|
+
licenseKey: process.env.LICENSE_KEY!, // 필수
|
|
795
797
|
});
|
|
796
798
|
```
|
|
797
799
|
|
|
@@ -1156,6 +1158,7 @@ interface MiddlewareOptions {
|
|
|
1156
1158
|
getNextAuthToken?: (req: NextRequest) => Promise<JWT | null>;
|
|
1157
1159
|
ssoBaseURL: string;
|
|
1158
1160
|
authServiceKey?: string;
|
|
1161
|
+
licenseKey: string;
|
|
1159
1162
|
}
|
|
1160
1163
|
```
|
|
1161
1164
|
|
|
@@ -1281,10 +1284,30 @@ setCustomTokens(response, accessToken, {
|
|
|
1281
1284
|
});
|
|
1282
1285
|
```
|
|
1283
1286
|
|
|
1287
|
+
### 문제 7: "License key is required" 또는 "Invalid license key" 에러
|
|
1288
|
+
|
|
1289
|
+
**해결 방법:**
|
|
1290
|
+
라이센스 키는 모든 함수 호출 시 필수입니다. 환경 변수에서 라이센스 키를 가져와서 전달하세요:
|
|
1291
|
+
|
|
1292
|
+
```typescript
|
|
1293
|
+
const licenseKey = process.env.LICENSE_KEY;
|
|
1294
|
+
if (!licenseKey) {
|
|
1295
|
+
throw new Error("LICENSE_KEY environment variable is required");
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
// 함수 호출 시 licenseKey 전달
|
|
1299
|
+
const response = await handleMiddleware(req, middlewareConfig, {
|
|
1300
|
+
secret: process.env.NEXTAUTH_SECRET!,
|
|
1301
|
+
licenseKey, // 필수
|
|
1302
|
+
ssoBaseURL: process.env.SSO_BASE_URL!,
|
|
1303
|
+
// ... 기타 옵션
|
|
1304
|
+
});
|
|
1305
|
+
```
|
|
1306
|
+
|
|
1284
1307
|
## 📦 패키지 정보
|
|
1285
1308
|
|
|
1286
1309
|
- **패키지명**: `@thinkingcat/auth-utils`
|
|
1287
|
-
- **버전**: `1.0.
|
|
1310
|
+
- **버전**: `1.0.10`
|
|
1288
1311
|
- **라이선스**: MIT
|
|
1289
1312
|
- **저장소**: npm registry
|
|
1290
1313
|
|