Terminal Waiting for Authenication


#1

I am new to C9. I am doing a Google codelab on a Chromebook Pixel (not using dev mode). The following was attempted in the terminal. When I attempt to open the Firebase authentication URL in a new Chrome browser tab, I do get the permission pop-up and was able to grant permissions, but fails on the localhost 9005. I get “localhost refused to connect.”

Terminal entries were …
npm install -g bower npm install -g firebase-tools
firebase version alias firebase="npm config get prefix/bin/firebase"
$ firebase login
? Allow Firebase to collect anonymous CLI usage information? Yes

Visit this URL on any device to log in:
https://accounts.google.com/o/oauth2/auth?client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com&scope=email%20openid%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloudplatformprojects.readonly%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffirebase&response_type=code&state=440894481&redirect_uri=http%3A%2F%2Flocalhost%3A9005

Waiting for authentication…


#2

Any suggestions? Is this a bug?


#3

You’ll need to set the callback url to your Cloud9 workspace preview url and use port 8080, it won’t know how to reach localhost. You’ll also need to make your application preview public. You can do that via the share button in the top right of your workspace. This is so that firebase can connect to your workspace (your workspace is private to you only by default).


#4

I assume that the suggestion to “make your application preview public” means the enable “public” for the “application” option in the share dialog.

But this button is disabled for me. Only the “public” button for “editor” is live, and I presumably don’t want to change this from “public”

How can I make my application preview public for firebase auth under these circumstances?

Also, I am unable to add my C9 workspace url as an authorized domain in the Firebase console. It is rejected, with or without the port specified. Has anyone had actual success using Firebase auth working with c9?


#5

in cloud9 it is advisable to login to firebase with

firebase login --no-localhost

it works


#6

How do I cancel the login attempt so that the shell stops…

“Waiting for authentication…”

Thanks!


#7

I did use CTRL-C. But I am wondering if there is a better way. :relaxed:


#8

Thanks! Worked for me.