프로젝트 인증은 애플리케이션 사용자 ID 계층입니다. 각 프로젝트는 자체 게시 가능 키, 사용자, ID, 세션, 서명 키, 리디렉션 정책, 이메일 전송 및 OAuth 앱을 받습니다.
#프로젝트 ID 경계
| ID | 소유자 | 목적 |
|---|---|---|
| HALO 계정 사용자 | HALO | 개발자 대시보드에 액세스 |
| 프로젝트 인증 사용자 | 귀하의 프로젝트 | 애플리케이션에 로그인 |
| 업스트림 공급자 ID | Google, Apple, GitHub, Microsoft | 프로젝트 확인 user |
| OAuth 앱 클라이언트 | 귀하의 프로젝트 | 로그인한 프로젝트 사용자에게 범위 지정 액세스 요청 |
#이메일 빠른 시작
- 1URL 구성
사이트 URL과 프로젝트에서 사용할 수 있는 모든 정확한 리디렉션 URL을 설정합니다.
- 2이메일 구성
Resend 키, 보낸 사람 주소 확인 및 세 가지 필수 HTML 템플릿을 추가하세요.
- 3게시 가능 키 복사
대시보드 인증 섹션에는 공개 엔드포인트에서 사용되는 프로젝트 키가 표시됩니다.
- 4사용자 세션 생성
Create the SDK client once, then sign up or sign in through
halo.auth. The SDK persists the browser session and rotates refresh tokens automatically.
import { createClient } from "agihalo-node-sdk/auth";
const halo = createClient(
"https://api.agihalo.com",
HALO_PROJECT_PUBLISHABLE_KEY
);
const { data, error } = await halo.auth.signInWithPassword({
email: "user@example.com",
password: "use-a-strong-password",
});
if (error) throw error;
// The SDK automatically sends apikey + Bearer <access_token>.
const { data: currentUser } = await halo.auth.getUser();#공개 API
GET
/api/v1/auth/settingsPOST
/api/v1/auth/signupPOST
/api/v1/auth/token?grant_type=passwordPOST
/api/v1/auth/token?grant_type=refresh_tokenGET
/api/v1/auth/userPOST
/api/v1/auth/logoutGET
/api/v1/auth/.well-known/jwks.json