Skip to content

Commit

Permalink
Move Firebase snippet to the body (#3898)
Browse files Browse the repository at this point in the history
* Update handler.py

* Update README.rst

* Update handler.py

* Update index.html

* Update index.html

* Update index.html

* Update index.html

* Update index.html

* Update index.html

Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
Co-authored-by: Charles Engelke <engelke@google.com>
Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
  • Loading branch information
4 people authored Jun 11, 2020
1 parent 6c8b755 commit 6da5a37
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,32 @@
<head>
<title>Datastore and Firebase Auth Example</title>

<!-- See https://github.com/firebase/firebaseui-web. -->
<!-- [START gae_python37_auth_init_firebase] -->
<!-- *******************************************************************************************
* TODO(DEVELOPER): Paste the initialization snippet from:
* http://console.firebase.google.com > Overview > Add Firebase to your web app.
***************************************************************************************** -->
<!-- [END gae_python37_auth_init_firebase] -->
<script>
if (typeof firebase === 'undefined') {
const msg = "Please paste the Firebase initialization snippet into index.html. See https://console.firebase.google.com > Overview > Add Firebase to your web app.";
console.log(msg);
alert(msg);
}
</script>
<!-- [START gae_python37_auth_include_firebaseui] -->
<script src="https://www.gstatic.com/firebasejs/ui/4.4.0/firebase-ui-auth.js"></script>
<link type="text/css" rel="stylesheet" href="https://www.gstatic.com/firebasejs/ui/4.4.0/firebase-ui-auth.css" />
<!-- [END gae_python37_auth_include_firebaseui] -->
<!-- [START gae_python37_auth_include_firebaseui] -->
<script src="https://cdn.firebase.com/libs/firebaseui/4.5.0/firebaseui.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.firebase.com/libs/firebaseui/4.5.0/firebaseui.css">
<!-- [END gae_python37_auth_include_firebaseui] -->

<script src="{{ url_for('static', filename='script.js') }}"></script>
<link type="text/css" rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">

</head>
<body>

<!-- See https://github.com/firebase/firebaseui-web. -->
<!-- [START gae_python37_auth_init_firebase] -->
<!-- *******************************************************************************************
* TODO(DEVELOPER): Paste the initialization snippet from:
* http://console.firebase.google.com > Overview > Add Firebase to your web app.
***************************************************************************************** -->
<!-- [END gae_python37_auth_init_firebase] -->
<script>
if (typeof firebase === 'undefined') {
const msg = "Please paste the Firebase initialization snippet into index.html. See https://console.firebase.google.com > Overview > Add Firebase to your web app.";
console.log(msg);
alert(msg);
}
</script>

<!-- [START gae_python37_auth_firebase_html] -->
<h1>Datastore and Firebase Auth Example</h1>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,35 @@
<head>
<title>Datastore and Firebase Auth Example</title>

<!-- See https://github.com/firebase/firebaseui-web. -->
<!-- [START gae_python37_auth_init_firebase] -->
<!-- *******************************************************************************************
* TODO(DEVELOPER): Paste the initialization snippet from:
* http://console.firebase.google.com > Overview > Add Firebase to your web app.
***************************************************************************************** -->
<!-- [END gae_python37_auth_init_firebase] -->
<script>
if (typeof firebase === 'undefined') {
const msg = "Please paste the Firebase initialization snippet into index.html. See https://console.firebase.google.com > Overview > Add Firebase to your web app.";
console.log(msg);
alert(msg);
}
</script>
<!-- [START gae_python37_auth_include_firebaseui] -->
<script src="https://cdn.firebase.com/libs/firebaseui/2.6.2/firebaseui.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.firebase.com/libs/firebaseui/2.6.2/firebaseui.css">
<!-- [END gae_python37_auth_include_firebaseui] -->
<!-- [START gae_python37_auth_include_firebaseui] -->
<script src="https://cdn.firebase.com/libs/firebaseui/4.5.0/firebaseui.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.firebase.com/libs/firebaseui/4.5.0/firebaseui.css">
<!-- [END gae_python37_auth_include_firebaseui] -->

<script src="{{ url_for('static', filename='script.js') }}"></script>
<link type="text/css" rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">

</head>
<body>

<!-- See https://github.com/firebase/firebaseui-web. -->
<!-- [START gae_python37_auth_init_firebase] -->
<!-- *******************************************************************************************
* TODO(DEVELOPER): Paste the initialization snippet from:
* http://console.firebase.google.com > Overview > Add Firebase to your web app.
***************************************************************************************** -->
<!-- [END gae_python37_auth_init_firebase] -->
<script>
if (typeof firebase === 'undefined') {
const msg = "Please paste the Firebase initialization snippet into index.html. See https://console.firebase.google.com > Overview > Add Firebase to your web app.";
console.log(msg);
alert(msg);
}
</script>

<!-- [START gae_python37_auth_firebase_html] -->
<h1>Datastore and Firebase Auth Example</h1>

<!-- [START gae_python37_auth_firebase_html] -->
<div id="firebaseui-auth-container"></div>

<button id="sign-out" hidden=true>Sign Out</button>
Expand Down

0 comments on commit 6da5a37

Please sign in to comment.