LoginSignup
10
2

More than 5 years have passed since last update.

vagrant + firebase loginでブラウザ認証が失敗する場合の解決方法

Last updated at Posted at 2018-04-20

こんな時

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....

login.PNG

fail.PNG

:sob:

こうなった時

解決

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

success.PNG

いけたー:blush:

10
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
2