Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
3
Help us understand the problem. What is going on with this article?

More than 3 years have passed since last update.

@nishiurahiroki

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

こんな時

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:

3
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
3
Help us understand the problem. What is going on with this article?