GithubHelp home page GithubHelp logo

firebase / quickstart-js Goto Github PK

View Code? Open in Web Editor NEW
5.0K 211.0 3.6K 17.26 MB

Firebase Quickstart Samples for Web

Home Page: https://firebase.google.com

License: Apache License 2.0

HTML 40.48% CSS 6.88% JavaScript 4.96% Shell 0.02% TypeScript 47.65%

quickstart-js's Introduction

Firebase Quickstarts for Javascript

A collection of quickstart samples demonstrating the Firebase APIs using the Javascript SDK. For more information, see firebase.google.com/docs/web/setup.

Samples are organized into the following subdirectories and include README.md files with instructions for getting started:

  • Auth
    • Anonymous Auth
    • Custom Auth
    • Email and Password auth
    • Email Link auth
    • Phone Auth using a visible ReCaptcha
    • Phone Auth using an invisible ReCaptcha
    • Phone Auth using popup
    • Google Auth in a Chrome Extension
    • Facebook auth using Facebook login button
    • Facebook auth using Firebase popup
    • Facebook auth using Firebase redirect
    • Google auth using Google sign-in button
    • Google auth using Firebase popup
    • Google auth using Firebase redirect
    • Twitter auth using Firebase popup
    • Twitter auth using Firebase redirect
    • Microsoft auth using Firebase popup
    • Microsoft auth using Firebase redirect
    • GitHub auth using Firebase popup
    • GitHub auth using Firebase redirect
    • Multi-factor authentication with SMS(currently only available for Google Cloud Identity Platform projects)
  • Database
    • Simple Social Blogging app
  • Firestore
    • Simple Rating App
  • Functions
    • Send requests to a Functions server-side instance and get back results.
  • Storage
    • Upload a file to Firebase Storage and display its URL
  • Messaging
    • Send notifications

How to make contributions?

Please read and follow the steps in the CONTRIBUTING.md

License

See LICENSE

Build Status

Actions Status

quickstart-js's People

Contributors

abeisgoat avatar abradham avatar archelogos avatar aruld avatar bojeil-google avatar daleseo avatar dependabot[bot] avatar dpebot avatar egilmorez avatar exaby73 avatar fand avatar fluorescenthallucinogen avatar hanslivingstone avatar hsubox76 avatar hyacccint avatar jhuleatt avatar kevinthecheung avatar kroikie avatar mmermerkaya avatar morganchen12 avatar nicolasgarnier avatar progh2 avatar qendolin avatar salakar avatar samtstern avatar simonsongirang avatar spencermathews avatar the-alchemist avatar wti806 avatar zwu52 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quickstart-js's Issues

What is the point?

Why not just build on existing Google, Facbeook & Twitter apis?
What is the benefit?

? Why .once('value') in function newPostForCurrentUser

This isn't an issue unless you want this code to be easily understood by people like myself ;-)

  1. Why is .once('value') used in this function?
  2. I can't understand why a function expected to write data is actually listening to an event, but at the same time is called directly when a button is clicked.
  3. Why not just write to the database without that listener, .once('value')?
  4. Why return within a return statement... isn't that a bit confusing?
  5. Why "single_value_read" if the clicked "Submit"?
/**
 * Creates a new post for the current user.
 */
function newPostForCurrentUser(title, text) {
  // [START single_value_read]
  var userId = firebase.auth().currentUser.uid;
  return firebase.database().ref('/users/' + userId).once('value').then(function(snapshot) {
    var username = snapshot.val().username;
    // [START_EXCLUDE]
    return writeNewPost(firebase.auth().currentUser.uid, username,
        firebase.auth().currentUser.photoURL,
        title, text);
    // [END_EXCLUDE]
  });
  // [END single_value_read]
}

I was feeling great while analysing and understanding every part of the code, then this one block got me stumped. Would be great to understand it. Thank you. :-)

Create Button Not wokring in the Demo

Create Post button not working in the Demo..
Is functionality not implemented or just dummy button..?
It just showing Database Web Quickstart and the SignOut button and Create Button...
firebase

Deleting user-post, post-comments?

I was looking at quickstart-js/database/scripts/main.js and I couldn't find any code that deletes user-posts or post-comments from firebase database.

For example, I am interested in seeing how you would delete the user-posts/userId and posts/relatedPosts in parallel. Was this part omitted for simplicity?

Error: authObj.authWithPassword is not a function

when try to login using Email and passsword
Error: Error: authObj.authWithPassword is not a function

When try to login using google
Error: authObj.$authWithOAuthPopup is not a function

"https://www.gstatic.com/firebasejs/3.0.3/firebase.js"

Code:
myApp.controller('LoginCtrl', ['$scope' ,'$state', '$firebaseAuth', '$firebaseArray', function($scope, $state, $firebaseAuth, $firebaseArray) {

   // var rootRef = firebase.database().ref();

    var authObj = $firebaseAuth();

    $scope.login = function () {

        authObj.authWithPassword({
          email    : $scope.loginEmail,
          password : $scope.loginPassword
        }, function(error, authData) {
          if (error) {
            console.log("Login Failed!", error);
          } else {
            console.log("Authenticated successfully with payload:", authData);
            $state.go('home');
          }
        });

    }

    firebaseAuthLogin = function(provider){
        console.log(provider);
        authObj.$authWithOAuthPopup(provider).then(function (authData) {
            console.log("Authenticated successfully with provider " + provider +" with payload:", authData);
        }).catch(function (error) {
            console.error("Authentication failed:", error);
        });

    }

    $scope.googleLogin = function () {
       firebaseAuthLogin('google');
    }

}]);

database example bug

Hi , the current database example has a bug for user to vote for other people's post.everytime i try to vote, postRef.transaction(function(post), the 'post ' always is null.

1, the toggletoggleStar function, should always pass in the current user, not the post author's uid.

function toggleStar(postRef) {
  var uid=firebase.auth().currentUser.uid
  postRef.transaction(function(post) {
    if (post.stars && post.stars[uid]) {
      post.starCount--;
      post.stars[uid] = null;
    } else {
      post.starCount++;
      if (!post.stars) {
        post.stars = {};
      }
      post.stars[uid] = true;
    }
    return post;
  });
}

i changed it to this, (also i pass author id to createPostElement function) and call this function like this:

  var onStarClicked = function() {
    var globalPostRef = firebase.database().ref('/posts/' + postId);
    var userPostRef = firebase.database().ref('/user-posts/' + uid + '/' + postId);
    toggleStar(globalPostRef);
    toggleStar(userPostRef);

chrome-extension: CSPs & database()

first: this project is a godsend, so thanks.

second, just for context: i'm using a boilerplate for my chrome extension that has several csps set to enable hot-reloading

Anyway, I got auth running by following your readme steps (seriously, thanks). but when I try to fire-up (pun, ugh) the database:

  let fb = firebase.initializeApp(firebaseConfig);
  let db = fb.database()

... i get some csp errors (text versions below):
image

By adding the iframe URLs to my csp in the manifest, i can make the errors go away. that is to say, changing csp from:

"content_security_policy": "default-src 'self'; script-src 'self' https://www.gstatic.com/ https://cdn.firebase.com https://*.firebaseio.com https://www.googleapis.com http://localhost:3000 'unsafe-eval'; object-src 'self';connect-src https://www.googleapis.com/ http://localhost:3000 ws://localhost:3000 ws://localhost:35729; style-src * 'unsafe-inline'; img-src 'self' data:;",

to:

"content_security_policy": "default-src 'self'; script-src 'self' https://cdn.firebase.com https://www.gstatic.com/ https://*.firebaseio.com https://www.googleapis.com http://localhost:3000 'unsafe-eval'; object-src 'self';connect-src https://www.googleapis.com/ http://localhost:3000 ws://localhost:3000 ws://localhost:35729 wss://s-usc1c-nss-133.firebaseio.com/ wss://wayhome-d.firebaseio.com; style-src * 'unsafe-inline'; img-src 'self' data:; frame-src wss://s-usc1c-nss-133.firebaseio.com/",

My concern is: are these URLs static to my project? eg wss://s-usc1c-nss-133... ? It's easy enough to set up a dev/prod split for my separate firebase projects, but if the urls change unpredictably, I'll of course have to find another solution.

I tried setting the frame-src to wss://*.firebaseio.com, but that threw the same csp error as above.

Full console error text:

Refused to connect to 'wss://s-usc1c-nss-133.firebaseio.com/.ws?v=5&ns=wayhome-d' because it violates the following Content Security Policy directive: "connect-src https://www.googleapis.com/ http://localhost:3000 ws://localhost:3000 ws://localhost:35729".
bg.open @ database.js:122(anonymous function) @ database.js:137

database.js:129 Refused to frame 'https://s-usc1c-nss-133.firebaseio.com/.lp?dframe=t&id=972161&pw=aKWcrZ89En&ns=wayhome-d' because it violates the following Content Security Policy directive: "default-src 'self'". Note that 'frame-src' was not explicitly set, so 'default-src' is used as a fallback.
gg.start @ database.js:129(anonymous function) @ database.js:139(anonymous function) @ database.js:30Tb @ database.js:53Sb @ database.js:30(anonymous function) @ database.js:128pRTLPCB @ .lp?start=t&ser=8877773&cb=2&v=5&ns=wayhome-d:6(anonymous function) @ .lp?start=t&ser=8877773&cb=2&v=5&ns=wayhome-d:9
database.js:122 Refused to connect to 'wss://s-usc1c-nss-133.firebaseio.com/.ws?v=5&s=qCdXJWFtmoRHKhkjBrMd5AKlKNBcQfaz&ns=wayhome-d' because it violates the following Content Security Policy directive: "connect-src https://www.googleapis.com/ http://localhost:3000 ws://localhost:3000 ws://localhost:35729".
bg.open @ database.js:122xg @ database.js:143(anonymous function) @ database.js:139(anonymous function) @ database.js:30Tb @ database.js:53Sb @ database.js:30(anonymous function) @ database.js:128pRTLPCB @ .lp?start=t&ser=8877773&cb=2&v=5&ns=wayhome-d:6(anonymous function) @ .lp?start=t&ser=8877773&cb=2&v=5&ns=wayhome-d:9

Upload error

hello.
I got error when uploading a large file
Firebase Storage: An unknown error occurred, please check the error payload for server response.
but if file is small all are ok.
Could anyone help me?

Error Payload

Hi,

I tried out the demo for Firebase Storage. Whenever, I uploaded a file, I saw this message on the clipboard: firebase.js:486 Uncaught FirebaseError: Firebase Storage: An unknown error occurred, please check the error payload for server response.

How do I go about rectifying this? Thank you!

after google signin, user.displayName is null

Browser: Chrome
Browser version: 51.0.2704.84
Operating system: OSX
Operating system version: 10.11.5

What steps will reproduce the problem:
1, signin with google,
2, create a post
3, you will see author for the post is undefined

What is the expected result?
should show signed in google user name

What happens instead of that?
shows undefined

after google signin, user.displayName is null from firebase.auth. onAuthStateChanged callback

FCM service worker error

In Firefox 49.0.1, after messaging.requestPermission()

Requesting permission...messaging:221:5
Notification permission granted.messaging:225:7
service workerfirebase-messaging-sw.js:1:1
Service worker event waitUntil() was passed a promise that rejected with 'TypeError: b is null'.firebase-messaging.js:21:1
Sending token to server...

Anonymous Login and SSO Login

I just want to read and write to a database with both anonymous users and signed users with the leanest code possible. Preferrably use the anonID and then to the SSO. I cannot find one up to date example of that. Its too bad the old firebase site is out of date.

Error with main.js in database sample

I'm receiving this error with the database sample:

Uncaught ReferenceError: firebase is not defined
(anonymous function) @ main.js:290

The firebase.js file is linked in <head> tag

<script src="https://www.gstatic.com/firebasejs/live/3.0/firebase.js"></script>

Equivalent of getAuth()

firebase v2 has the Firebase.getAuth() that synchronously retrieves the current user.

firebase v3 has no longer has that method, but comes with firebase.auth().currentUser which is not synchronous (it is null on page load). This makes it hard to perform logic on page load -- do I redirect the user to the login page, or is the user is actually logged in?

What is the equivalent of synchronous getAuth() in v3?

Focus los after Firebase initialization

I am working on a webapp for ios. If I set a focus to a specific input it works well. But if firebase is initialized (firebase.initializeApp()), the focus is lost. Is there any reason / workaround for that behaviour?

firebase is not defined

trying to load this in chrome, in the console I see: firebase is not defined

any help ? thx!

[storage] overwriting the same file

Hi there!!

Currently it's not possible to upload more than 1 file which is overwritten every time that another file is uploaded.
It occurs because the ref path is a constant string 'images'.

In /storage/index.html line 88:

var uploadTask = storageRef.child('images').put(file, metadata);

So something like this should fix this problem:

var uploadTask = storageRef.child('images/' + new Date().getTime() + file.name).put(file, metadata);

Firebase Error: auth/invalid-api-key, Your API key is invalid, please check you have copied it correctly.

Ionic version:
v1.3.1

AngularFire:
2.0.2

Firebase js:
v3.3.0
Build: 3.3.0-rc.7

Issue:
I am using the correct config keys from Firebase console > Web Setup, all of a sudden my app started throwing error from Firebase as below:

R {code: "auth/invalid-api-key", message: "Your API key is invalid, please check you have copied it correctly."}

Ionic code to login user with firebase email password enabled firebase.auth().signInWithEmailAndPassword()

Expected:
What should be the fix I have checked the API key its same? My app was working fine with same source code and API key and now it is just looping the above error in console.

Sign in with Twitter: Everytime authorization

Hi,

currently I am testing the twitter-redirect.html example, but I have a problem.
Compared to the google login, everytime when I want to sign in with twitter, twitter asks me to authorize the app, is this normal? Google asks me just one time ...

Jan

Can I do a turn-based game with firebase?

Hi,
Can I do a turn-based game with firebase? In my game idea, there will be rooms like poker.

Is it possible to make it only using firebase? Or do I have to use a server?

ReferenceError: componentHandler is not defined

Hello.

I'm new to Firebase.
I'm trying to run Firebase Realtime Database Quickstart (https://github.com/firebase/quickstart-js/tree/master/database).
I entered "firebase serve" on my terminal and connected to "localhost:5000" on my browser.
Then I succeeded in logging in with my Google account.
However, when I try to submit a new post, an exception occurs.
I have no idea about the exception below, can anyone help me?

FIREBASE WARNING: Exception was thrown by user callback. ReferenceError: componentHandler is not defined at createPostElement (http://localhost:5000/scripts/main.js:123:3) at http://localhost:5000/scripts/main.js:265:11 at https://www.gstatic.com/firebasejs/3.2.1/firebase.js:416:375 at Tb (https://www.gstatic.com/firebasejs/3.2.1/firebase.js:288:165) at uc (https://www.gstatic.com/firebasejs/3.2.1/firebase.js:268:215) at vc (https://www.gstatic.com/firebasejs/3.2.1/firebase.js:267:837) at Ph.g.update (https://www.gstatic.com/firebasejs/3.2.1/firebase.js:454:470) at W.g.update (https://www.gstatic.com/firebasejs/3.2.1/firebase.js:470:437) at writeNewPost (http://localhost:5000/scripts/main.js:57:36) at http://localhost:5000/scripts/main.js:323:9 Uncaught ReferenceError: componentHandler is not defined FIREBASE WARNING: Exception was thrown by user callback. ReferenceError: componentHandler is not defined at createPostElement (http://localhost:5000/scripts/main.js:123:3) at http://localhost:5000/scripts/main.js:265:11 at https://www.gstatic.com/firebasejs/3.2.1/firebase.js:416:375 at Tb (https://www.gstatic.com/firebasejs/3.2.1/firebase.js:288:165) at uc (https://www.gstatic.com/firebasejs/3.2.1/firebase.js:268:215) at vc (https://www.gstatic.com/firebasejs/3.2.1/firebase.js:267:837) at Ph.g.update (https://www.gstatic.com/firebasejs/3.2.1/firebase.js:454:470) at W.g.update (https://www.gstatic.com/firebasejs/3.2.1/firebase.js:470:437) at writeNewPost (http://localhost:5000/scripts/main.js:57:36) at http://localhost:5000/scripts/main.js:323:9 Uncaught ReferenceError: componentHandler is not defined FIREBASE WARNING: Exception was thrown by user callback. ReferenceError: componentHandler is not defined at createPostElement (http://localhost:5000/scripts/main.js:123:3) at http://localhost:5000/scripts/main.js:265:11 at https://www.gstatic.com/firebasejs/3.2.1/firebase.js:416:375 at Tb (https://www.gstatic.com/firebasejs/3.2.1/firebase.js:288:165) at uc (https://www.gstatic.com/firebasejs/3.2.1/firebase.js:268:215) at vc (https://www.gstatic.com/firebasejs/3.2.1/firebase.js:267:837) at Ph.g.update (https://www.gstatic.com/firebasejs/3.2.1/firebase.js:454:470) at W.g.update (https://www.gstatic.com/firebasejs/3.2.1/firebase.js:470:437) at writeNewPost (http://localhost:5000/scripts/main.js:57:36) at http://localhost:5000/scripts/main.js:323:9 Uncaught ReferenceError: componentHandler is not defined FIREBASE WARNING: Exception was thrown by user callback. ReferenceError: componentHandler is not defined at createPostElement (http://localhost:5000/scripts/main.js:123:3) at http://localhost:5000/scripts/main.js:265:11 at https://www.gstatic.com/firebasejs/3.2.1/firebase.js:416:375 at Tb (https://www.gstatic.com/firebasejs/3.2.1/firebase.js:288:165) at uc (https://www.gstatic.com/firebasejs/3.2.1/firebase.js:268:215) at vc (https://www.gstatic.com/firebasejs/3.2.1/firebase.js:267:837) at Ph.g.update (https://www.gstatic.com/firebasejs/3.2.1/firebase.js:454:470) at W.g.update (https://www.gstatic.com/firebasejs/3.2.1/firebase.js:470:437) at writeNewPost (http://localhost:5000/scripts/main.js:57:36) at http://localhost:5000/scripts/main.js:323:9 Uncaught ReferenceError: componentHandler is not defined

Log Out Button

With Google Authentication as a part of the database project, it might be nice to include a log out button for users after they have logged in. I imagine this is functionality nearly any project with authentication would need.

[Question] How do I connect to Google API

Dear team, I would like to know the best practice to connect after Firebase login via Google to the Google API. Currently, there is opening a second popup to login again ... I didn't found a better way or documentation, neither on Firebase nor on Google site.

Goal: Login on Firebase app with Google credentials and retrieve user calendar entries

I can get the Firebase / Google Login token like this:
firebase.auth().currentUser.getToken(true).then(function(token) { ... });

And my standalone Google API code is as following (and works):

gapi.load('client:auth2', function() {
    gapi.client.setApiKey(API_KEY);    
    gapi.auth2.init({
      client_id: CLIENT_ID,
      scope: SCOPES
    }).then(function() {          
      gapi.auth2.getAuthInstance().signIn();
      if (gapi.auth2.getAuthInstance().isSignedIn.get()) {
        console.log(gapi.auth2.getAuthInstance().currentUser.get().getBasicProfile().getName());

        gapi.client.load('calendar', 'v3', function() {

          let req = gapi.client.calendar.events.list({
            calendarId: 'primary',
            maxResult: 10
          });

          req.execute(function(resp) {

            console.log(resp);

          });

        });

      } else {
        console.log('not signed in');
      }        
    });
  });

currentUser.displayName is null

Browser: Chrome
Browser version: 51.0.2704.84
Operating system: OSX
Operating system version: 10.11.5

What steps will reproduce the problem:
1, signin with google,
2, create a post
3, go to firebase console, check database Tab, in posts, user-posts all don't have author field from written here

What is the expected result?
should have author field

What happens instead of that?
no author field

Provider scopes details

What are you trying to do or find out more about?
Take information about scope that I added using provider.addScope() in the user object before logged in.

Where have you looked?
On Firebase Facebook login guide. Here it shows how we can add scopes to the provider, but where that information are going to show on the user object?

Where did you expect to find this information?
I think on reference should have some information on how take that information.

auth/email.html, Cross Origin Request Blocked

I am trying the email auth example, simply using the example code.

Created a new project in the firebase console,
Authorized email/password in the auth tab,
Added the snippet in the page.
Used firebase deploy.

The page load fine, but when I try to use one of the buttons, the console get two messages:

15:01:51.558 Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=AIzaSyAVZinr7U7gnNXKf7FhZaKSOIIefFlzz8g. (Reason: CORS header 'Access-Control-Allow-Origin' missing).1 (unknown)

15:01:51.567 Object { code: "auth/network-request-failed", message: "A network error (such as timeout, iā€¦", stack: "" }1 /:67:13
toggleSignIn/<() /:67
vd/e.child</e.Ma<() firebase.js:82
Ed() firebase.js:85
Ad() firebase.js:85
G.prototype.Kd() firebase.js:84
kd() firebase.js:78

Did I forgot something before trying the example?

Log in screen flashes

When using the Firebase Database example the log in page shows up for a few seconds even if the user is logged in.

Is there a way to avoid this?

setBackgroundMessageHandler never fired

The background handler is not working: no matter what I do, the sw always use the regular onMessage, displaying the actual notification I sent instead of the custom one set on the handler.

My code is the exact same as the one in the repo:

messaging.setBackgroundMessageHandler(function(payload) {
    console.log('[firebase-messaging-sw.js] Received background message ', payload);
    // Customize notification here
    const notificationTitle = 'Background Message Title';
    const notificationOptions = {
        body: 'Background Message body.',
        icon: '/Content/Img/logo-amezze-120.png'
    };

    return self.registration.showNotification(notificationTitle,
        notificationOptions);
});

Having issues reading from the database

I am building a blog powered by firebase just to try it out on my own. But issues looping through my posts. this code :

firebase.database().ref('blog/').child('posts/')on('value', function(snap){
      console.log(snap.val());
});

and 

firebase.database().ref('blog/').child('posts/').on("value", snap => {
      for (let post in snap.val()) {
          console.log(post)
      }
});

returns objects with probably the post ids of those objects which I dont know how to determine that.
My question is Do I have to work with postId?
If yes, how? and if no, How?

[Question] Delay on inital load

Hi there! If I use Firebase for iOS webApps, which are added to the homescreen, after reload the app there is a huge delay for Firebase initialization. I know iOS is refreshing the webapp on each reload, but I thought Firebase is caching the database in local storage for immediate init on reload ... or is that not correct? Do I have to add anything to enable that feature?

Here my JsFiddle:
https://jsfiddle.net/scriptPilot/n3ycqd1j/2/

Thanks!

Sync problems with FB login

hello!

I'm having some problems using the FB Authentication with OAuth Credentials. I have not checked if it's a common behavior in other Auth samples.

I think it's just a JS sync problem and it's caused by the order of the JS functions and scripts.

Moving Firebase scripts and Dom modifiers at the end of the body, and then FB snippet and config, the sample works pretty well.

Errors can be seen here (original code): https://hipstercoding.firebaseapp.com/facebook-credentials.html

PR?

Thanks a lot! :)

Error in Chrome for github-redir.html sample. Log iframe.js:297 Uncaught Error: This browser is not supported.

I tried to setup the below sample in my own repo. I setup the firebase project to redirect to Github page and added my dev keys to init firebase.It is working in IE 11.
https://github.com/firebase/quickstart-js/blob/master/auth/github-redirect.html

In Chrome(50.0.2661.102) its showing below error in F12 tools and not getting the user details and token. After this error, it times out.
iframe.js:297 Uncaught Error: This browser is not supported.

Below is the Url to my sample repo where the same sample is setup.
http://joymon.github.io/PoCs/GistViaJS/testGitRedir.html

freezes when using with android emulator or device

I got this code working with desktop localhost but it froze when i tried either ionic view (on a android galaxy s6) or with the ionic android emulator:

ionic build ionic emulate android -l

ionic v1.7.16

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.