「Gcp/Firebase/Authentication」の版間の差分
ナビゲーションに移動
検索に移動
| 18行目: | 18行目: | ||
"createdAt": "1649335001653" | "createdAt": "1649335001653" | ||
}]} | }]} | ||
</pre> | |||
phpでの処理例 | |||
<pre> | |||
$json_object = json_decode($user_json, true); | |||
$users = $json_object['users']; | |||
foreach ($users as $key => $user) { | |||
echo $key . " ".print_r($user,1); | |||
echo "aaa\n"; | |||
if ($key > 100) { | |||
break; | |||
} | |||
} | |||
</pre> | </pre> | ||
参考:https://blog.yuhiisk.com/archive/2018/08/22/export-firebase-auth-csv.html | 参考:https://blog.yuhiisk.com/archive/2018/08/22/export-firebase-auth-csv.html | ||
2025年7月31日 (木) 08:44時点における版
authenticationのエクスポート
npm install -g firebase-tools firebase login firebase auth:export account_file.json --format=JSON --project=[project1]
出力ファイル例:account_file.json
{"users": [
{
"localId": "00017f8Daqdyxxxxxxxxxxxxxxxxx",
"lastSignedInAt": "1730288278340",
"createdAt": "1730288278340"
},
"localId": "zzzrCWoliwU7dxxxxxxxxxxxxxxx",
"lastSignedInAt": "1649335001653",
"createdAt": "1649335001653"
}]}
phpでの処理例
$json_object = json_decode($user_json, true);
$users = $json_object['users'];
foreach ($users as $key => $user) {
echo $key . " ".print_r($user,1);
echo "aaa\n";
if ($key > 100) {
break;
}
}
参考:https://blog.yuhiisk.com/archive/2018/08/22/export-firebase-auth-csv.html