티스토리 뷰

준비물

  1. Fibsebase console → 프로젝트 선택
    1. 프로젝트 개요 옆 톱니바퀴 → 프로젝트 설정 → 웹 API 키
    2. Authentication → 테스트에 사용할 이메일+암호 사용자 추가

CURL 사용

터미널 명령 요청 (Request)

curl 'https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=[FIREBASE_WEB_API_KEY]' \
-H 'Content-Type: application/json' \
--data-binary '{"email":"[이메일]","password":"[암호]","returnSecureToken":true}'

응답 (Response)

{
  "kind": "identitytoolkit#VerifyPasswordResponse",
  "localId": "3yENxxxxxxxxxxxxxxxxxxGJx1",
  "email": "some@thing.com",
  "displayName": "로그인 사용자 닉네임",
  "idToken": "ID토큰-문자열-eyJhbGci...vQ",
  "registered": true,
  "profilePicture": "https://lh3.googleusercontent.com/a-/AFdxxxxxxxxxxxky_2ndP4j-xxILD7FA=x96-x",
  "refreshToken": "갱신토클-APZUo0T...xXV5A",
  "expiresIn": "3600"
}

응답 중 "idToken" 값 사용.

댓글