@thinkingcat/auth-utils 1.0.10 → 1.0.11
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 +16 -16
- 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.11"
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
```
|
|
@@ -152,25 +152,25 @@ import {
|
|
|
152
152
|
} from "@thinkingcat/auth-utils";
|
|
153
153
|
```
|
|
154
154
|
|
|
155
|
-
### 2. 라이센스 키
|
|
155
|
+
### 2. 라이센스 키 사용
|
|
156
156
|
|
|
157
|
-
라이센스
|
|
157
|
+
라이센스 키는 **필수**입니다. 모든 함수 호출 시 `licenseKey` 파라미터를 전달해야 합니다.
|
|
158
158
|
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
159
|
+
```typescript
|
|
160
|
+
// 예시: handleMiddleware 사용 시
|
|
161
|
+
const response = await handleMiddleware(req, middlewareConfig, {
|
|
162
|
+
secret: process.env.NEXTAUTH_SECRET!,
|
|
163
|
+
isProduction: process.env.NODE_ENV === "production",
|
|
164
|
+
ssoBaseURL: process.env.SSO_BASE_URL!,
|
|
165
|
+
licenseKey: process.env.LICENSE_KEY!, // 필수
|
|
166
|
+
});
|
|
165
167
|
```
|
|
166
168
|
|
|
167
|
-
**중요**:
|
|
168
|
-
|
|
169
|
-
- 라이센스
|
|
170
|
-
-
|
|
171
|
-
- 함수 파라미터로 `licenseKey`를 전달하면 환경 변수보다 우선합니다.
|
|
169
|
+
**중요**:
|
|
170
|
+
- 라이센스 키는 모든 함수 호출 시 필수 파라미터입니다.
|
|
171
|
+
- 라이센스 키가 없거나 유효하지 않으면 함수가 에러를 발생시킵니다.
|
|
172
|
+
- 라이센스 키는 SHA-256 해시로 변환되어 모듈 내부의 유효한 키 목록과 비교됩니다.
|
|
172
173
|
- 다른 환경 변수(NEXTAUTH_SECRET, SSO_BASE_URL 등)는 이 패키지를 사용하는 애플리케이션에서 관리합니다.
|
|
173
|
-
- `.env.example` 파일을 참조하여 라이센스 키 설정 방법을 확인하세요.
|
|
174
174
|
|
|
175
175
|
## 📚 주요 기능 (Features)
|
|
176
176
|
|
|
@@ -1307,7 +1307,7 @@ const response = await handleMiddleware(req, middlewareConfig, {
|
|
|
1307
1307
|
## 📦 패키지 정보
|
|
1308
1308
|
|
|
1309
1309
|
- **패키지명**: `@thinkingcat/auth-utils`
|
|
1310
|
-
- **버전**: `1.0.
|
|
1310
|
+
- **버전**: `1.0.11`
|
|
1311
1311
|
- **라이선스**: MIT
|
|
1312
1312
|
- **저장소**: npm registry
|
|
1313
1313
|
|