Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Firebase authHandler not working in Ionic View App

$
0
0

@Holzi wrote:

Hello, i created a user auth with firebase and ionic, it works fine on the device an in the browser but I wanted to test ist on different devices so i use the ionc view app, here the code:

  function authHandler(error, authData) {
            if (error) {
                $scope.logmessage.push("Login Failed!", error);
            } else {
                $scope.logmessage.push("Authenticated successfully with payload:", authData);
            }
        }


       var ref = new Firebase("https://vivid-heat-4820.firebaseio.com");
        ref.authWithPassword({
            email    : 'username',
            password : 'password'
        }, authHandler);

The error seems to be that it never reaches the "else" from the authHandler function,
if i make a fail login i get the Error Callback with the Error Message.

see this:

function authHandler(error, authData) {
                    $scope.logmessage.push("This message i only get when i do a fail login);
            }

Thanks!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>