Setting up JupyterHub

35 views
Skip to first unread message

Nicolaus Schmandt

unread,
Nov 27, 2017, 12:49:06 AM11/27/17
to Google App Engine
Hey guys,
Sorry for such a simple question, but I'm trying to set up a jupyter hub instance. I'm following this tutorial: https://cloud.google.com/solutions/using-tensorflow-jupyterhub-classrooms

But I'm stuck on Deploying JupyterHub, Step 5c, where I'm supposed to enter values into the client ID, and it says "Set Authorized JavaScript origins to your domain name"

What is my "domain name?" Do I just put the IP address? Am I supposed to be able to access these instances via a webpage, because I tried that and it isn't working.

Any help, or direction to a more clear tutorial, would be much appreciated.
Thanks in advance,
Nick

George (Cloud Platform Support)

unread,
Nov 27, 2017, 4:52:01 PM11/27/17
to Google App Engine
Hello Nicolaus, 

Authorized JavaScript origins in this case refer to the authorized redirect URIs to be called back as part of the 3-legged OAuth 2.0 flow. This flow is illustrated on the "Using OAuth 2.0 to Access Google APIs" documentation page. JupyterHub uses OAuth login and needs to push a code to your application. This push action is performed by way of a call to a redirect URL with a code query parameter, in a form analogous to "http://yoursite/callback?code=[code to exchange]". The JavaScript origins should list the redirect URLs you want to use in the process. 

To clarify the setup, you may check the "Architectural Diagram" on the "Using TensorFlow and JupyterHub in Classrooms" page. Two classroom machines are depicted there, as well as the Container Engine - Kubernetes Cluster group, that refers for authentication to the OAuth Login - Cloud IAM element. 

For a more clear tutorial, you can follow the explanations provided on the "Google API: set a JavaScript Origin to solve the redirect_uri_mismatch error" page, or other similar information sources, such as "Google OAuth 2: access data from a Google user in your application". 

Examples of authorized redirect URIs: 

Reply all
Reply to author
Forward
0 new messages