0
使用Firebase Web SDK 4.2.0對用戶進行身份驗證會在JWT令牌內部提供兩種不同的負載。有時它包含此:使用Firebase身份驗證不一致的JWT令牌負載
{
"azp": "...",
"aud": "...",
"sub": "...",
"email": "...",
"email_verified": true,
"at_hash": "...",
"iss": "accounts.google.com",
"iat": 1502712944,
"exp": 1502716544
}
等次:
{
"iss": "https://securetoken.google.com/{FIREBASE_PROJECT_ID}",
"name": "...",
"picture": "...",
"aud": "...",
"auth_time": 1502642892,
"user_id": "...",
"sub": "...",
"iat": 1502711791,
"exp": 1502715391,
"email": "...",
"email_verified": true,
"firebase": {
"identities": {
"google.com": [
"{GOOGLE_USER_ID}"
],
"email": [
"..."
]
},
"sign_in_provider": "google.com"
}
}
這到底是怎麼回事?由於我在進行服務器端驗證(在Go中,不使用Admin SDK),如果響應具有一致的格式,這將有所幫助。
雖然這併發生在不改變認證碼的情況下。我想我必須在服務器上分別處理每個案例。 –