πŸ“– star365 Docs
← λ¬Έμ„œ ν—ˆλΈŒ

πŸ”Œ star365 Integration Guide

9 ν”Œλž«νΌ (plus365, safenet, sjclinic, emr, vn, upfinance, mlm, gws, politics)을 star365 톡합 νšŒμ›μœΌλ‘œ μ—°κ²°ν•˜λŠ” 방법.

λΉ λ₯Έ μ‹œμž‘ β€” κ°€μž… 훅은 μ„œλ²„μ—μ„œ ν˜ΈμΆœν•©λ‹ˆλ‹€

⚠️ 2026-07-28 λ³€κ²½: λΈŒλΌμš°μ €μ—μ„œμ˜ star365.signup() 은 더 이상 λ™μž‘ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€(401). λΈŒλΌμš°μ €λŠ” ν‚€λ₯Ό κ°€μ§ˆ 수 μ—†μ–΄, 이 경둜λ₯Ό 열어두면 λˆ„κ΅¬λ‚˜ μž„μ˜ email/platform 으둜 쀑앙 νšŒμ›μ„ λ§Œλ“€ 수 μžˆλŠ” μ˜€ν”ˆ ν”„λ‘μ‹œκ°€ λ©λ‹ˆλ‹€. (ssoLogin 이 2026-07-26 에 같은 이유둜 μ„œλ²„ μ „μš©μ΄ 된 것과 동일)

κ°€μž… 성곡 직후, ν”Œλž«νΌ μ„œλ²„μ—μ„œ:

const r = await fetch('https://api.star365.site/members/register', {
  method: 'POST',
  headers: { 'content-type': 'application/json', 'x-api-key': process.env.KAHAN_MEMBERS_KEY },
  body: JSON.stringify({ email, platform: 'plus365', local_user_id: String(userId) }),
  signal: AbortSignal.timeout(5000),
});
if (r.ok) {
  const { star365_uid } = await r.json();
  // ⚠️ λ°˜λ“œμ‹œ μ €μž₯ν•  것 β€” 이 값이 μ—†μœΌλ©΄ κ΅¬λ…Β·μ—”νƒ€μ΄ν‹€λ¨ΌνŠΈλ₯Ό μ‘°νšŒν•  ν‚€κ°€ μ—†μ–΄
  //    ν•΄λ‹Ή νšŒμ›μ€ μ˜μ›νžˆ 무료 등급에 λ¨Έλ­…λ‹ˆλ‹€(2026-07 에 4개 ν”Œλž«νΌμ—μ„œ μ‹€μ œλ‘œ λ°œμƒ).
  await db.users.update({ where: { id: userId }, data: { star365Uid: star365_uid } });
}

ν˜ΈμΆœμ€ best-effort 둜 λ‘λ˜(κ°€μž… 흐름을 막지 μ•ŠμŒ), μ‘λ‹΅μ˜ star365_uid λŠ” λ°˜λ“œμ‹œ μ €μž₯ν•˜μ„Έμš”.

API μ—”λ“œν¬μΈνŠΈ

Base: https://api.star365.site

νšŒμ› 등둝

POST /members/register
Content-Type: application/json

{ "email": "user@example.com", "platform": "plus365", "local_user_id": "u-123", "extra": {} }

응닡: { "star365_uid": "...", "created": true|false, "tier": "BRONZE" }

λ©±λ“±(idempotent): 같은 email+platform 재호좜 μ‹œ κΈ°μ‘΄ UID λ°˜ν™˜.

이벀트 둜그

POST /members/events
{ "star365_uid": "...", "platform": "plus365", "event": "visit|login|purchase|referral", "meta": {} }

SSO λ°œκΈ‰

POST /auth/sso/issue
{ "email": "...", "platform": "...", "local_user_id": "..." }

응닡 μ‹œ λΈŒλΌμš°μ €μ— star365_sso (httpOnly, 7일) + star365_uid μΏ ν‚€κ°€ .star365.site λ„λ©”μΈμœΌλ‘œ μ„ΈνŒ…λ¨.

ν˜„μž¬ μ„Έμ…˜ 확인

GET /auth/me
Cookie: star365_sso=...

응닡: { "authenticated": true, "star365_uid": "...", "member": {...} }

SDK 레퍼런슀

star365.signup(...)    // ❌ μ„œλ²„ μ „μš© (λΈŒλΌμš°μ € 호좜 μ‹œ reject)
star365.ssoLogin(...)  // ❌ μ„œλ²„ μ „μš© (λΈŒλΌμš°μ € 호좜 μ‹œ reject)
star365.logEvent({ platform, event, meta })   // uid μžλ™
star365.me()
star365.logout()
star365.uid()                    // μΏ ν‚€μ—μ„œ 읽기
star365.isAuthenticated()
star365.byEmail(email)
star365.byUid(uid)
star365.statsCrossPlatform()
star365.statsNorthStar()

μΏ ν‚€ μ •μ±…

μΏ ν‚€ HttpOnly Secure SameSite Domain Max-Age
star365_sso βœ… βœ… Lax .star365.site 604800 (7일)
star365_uid ❌ βœ… Lax .star365.site 604800 (7일)

λͺ¨λ“  μ„œλΈŒλ„λ©”μΈ(*.star365.site)μ—μ„œ μžλ™ 인식. κ°€μž…λœ ν”Œλž«νΌ 도메인이 .star365.site 밖이면 SSO μΏ ν‚€ 곡유 λΆˆκ°€ β†’ ν•΄λ‹Ή ν”Œλž«νΌμ€ signup ν›…λ§Œ μ‚¬μš©.

배포킷 (각 ν”Œλž«νΌ μ„œλ²„μ— 적용)

ν‚· λŒ€μƒ λ‹€μš΄λ‘œλ“œ
Node.js signup patch plus365, safenet, sjclinic, emr, vn, upfinance, mlm, gws, politics hospital-nodejs.patch
PHP / WP signup snippet λ ˆκ±°μ‹œ ν”Œλž«νΌ php-wp.php
README 적용 κ°€μ΄λ“œ README.md

μž₯μ•  격리 원칙