Firebase login on button click

594 Views Asked by At

When I load my index.html the Twitter login box pops up right away. How can I trigger the Twitter login to popup on the button being clicked?

The code is JavaScript but, when I load the app the popup from Twitter that ask if you want to login with Twitter popsup right away. I want it only to open when the "Sign in with Twitter" button is clicked.

<script type="text/javascript" src="lib/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="lib/angular.min.js"></script>

<!-- configuration file -->
<script src="scripts/configuration/config.js"></script>

<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
  <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<!-- firebase login js -->
<script src="https://cdn.firebase.com/js/client/1.0.15/firebase.js"></script>
<script src="//cdn.firebase.com/js/simple-login/1.5.0/firebase-simple-login.js"></script>
<!-- AngularFire Library -->
<script src="https://cdn.firebase.com/libs/angularfire/0.7.1/angularfire.min.js"></script>

<div class="container-semifluid">
    <div align="center">
        <img src="ui/icons/twitter-login/button.png" />
    </div>
   </div>

Thank you

1

There are 1 best solutions below

0
Everton Yoshitani On

It would helps to help you if you post some of your code, also the firebaseSimpleLogin is deprecated are you using it? Within the new API you just need to wrap the example code into a function and call from your button. https://www.firebase.com/docs/web/api/firebase/authwithoauthpopup.html