こんな時
vagrantで立ち上げたVM上でfirebase login => ブラウザ認証がしたい
しかし…
$ firebase login
? Allow Firebase to collect anonymous CLI usage and error reporting information? Yes
Visit this URL on any device to log in:
https://accounts.google.com/o/oauth2/auth?client_id=xxxxxxxxxxxxxxxxx....
こうなった時
解決
VM ⇔ ホストPCで9005ポートをフォワーディングさせる
Vagranfileに以下を追記し、VMを再起動
Vagrantfile
Vagrant.configure("2") do |config|
# something
config.vm.network "forwarded_port", guest: 9005, host:9005 # Add this line!
# something
end
再起動後、VM上でfirebase login ⇒ ブラウザ認証してみる
firebase login
いけたー