Identity Platform
Identity Platform | Google Cloud
プロジェクトにおける Identity Platform ユーザー  |  Identity Platform のドキュメント  |  Google Cloud
実体は Firebase Authentication と同じ
Identity Platform と Firebase Authentication の違い  |  Identity Platform のドキュメント  |  Google Cloud
docs
ID トークンを検証する  |  Firebase Authentication
ADC 設定のトラブルシューティング  |  認証  |  Google Cloud
gcloud auth application-default set-quota-project しても quota project ないと言われる
code:output
message: '//cloud.google.com/docs/authentication/adc-troubleshooting/user-creds . Raw server response: "{"error":{"code":403,"message":"Your application is authenticating by using local Application Default Credentials. The identitytoolkit.googleapis.com API requires a quota project, which is not set by default. To learn how to set your quota project, see https://cloud.google.com/docs/authentication/adc-troubleshooting/user-creds .",...
サーバーに Firebase Admin SDK を追加する
Firebase Authentication は、gcloud OAuth クライアント ID を使用して生成された gcloud エンドユーザー認証情報を受け入れません。
そんなあ
Drive API のように --client-id-file= 渡すといけるらしい
OAuth2 Client ID は手動で作る?
Terraform にリソースなさそう
Creating "OAuth 2.0 Client IDs" (from GCP console) using this provider · Issue 6074 · hashicorp/terraform-provider-google (2020年)
ユーザーに対してカスタム クレームを構成する  |  Identity Platform のドキュメント  |  Google Cloud
Next.js とくみあわせる
セッションクッキーは next/headers と組み合わせる
Functions: cookies | Next.js
色々あるが...
Next.jsにFirebase Authenticationを導入するときに考えるべきこと - Ateam Tech Blog
メール & Password 認証で ID & Password をサーバーサイドへ送って自分でやる、idToken をセッションクッキーに入れる
割り切りは良いが Google や Apple などの認証に困る
Set up Google OAuth with Next.js using Next-Auth! - YouTube
Firebase じゃなくて単に Google Auth
NextAuth.js と Firebase Authentication の連携
これは良いと思う、Firebase ADK で auth やりつつ Credential Provider でやっている
Firebase Authenticationのセッション管理術 - Speaker Deck
Firebase Authentication はログインできるかどうかだけ、別の Cookie でやっている
セッション Cookie を管理する  |  Firebase Authentication を自分でやっている感じかなあ
【Next.js】NextAuth×Firebaseで認証管理 in appディレクトリ
Firebase を Next.js アプリと統合する
firebase/friendlyeats-web
このチュートリアル App Router だし今年の10月末に作られたやつだし良いね
もっとミニマムな実装がいいが
#GoogleCloud