Matt Sanford Matt Sanford - 1 year ago 88
Javascript Question

Transport Unavailable for OAuth

I am trying to login with google into my firebase project and I am getting a transport unavailable error with both the popup and redirect functions from firebase. Is it because I am working locally or am I doing something wrong here?

var app = angular.module('WOM', ["firebase"]);
app.controller('SampleCtrl', ['$scope', '$firebaseObject', '$firebaseAuth', function($scope, $firebaseObject, $firebaseAuth){
var ref = new Firebase(''); //Where data is stored
var auth = $firebaseAuth(ref);

$scope.login = function() {
$scope.authData = null;
$scope.error = null;

$scope.authData = authData;
$scope.error = error;

$ = $firebaseObject(ref); //assign data to scope


Answer Source

This likely means that you're working off the file system.

In order to run Auth methods, you'll have to be working on a bona-fide server. It's a good practice in general to develop off of a local server rather than the file system as that's closer to what the production environment behave like.

Try the http-server npm module to get up and running quickly.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download