PluginProbe ʕ •ᴥ•ʔ
Firebase Authentication / 1.1.2
Firebase Authentication v1.1.2
1.7.0 trunk 1.0.0 1.1.1 1.1.2 1.1.3 1.1.4 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.8 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9
firebase-authentication / admin / js / firebase-wp-login.js
firebase-authentication / admin / js Last commit date
bootstrap.min.js 6 years ago custom.js 6 years ago firebase-app.js 6 years ago firebase-auth-main-script.js 6 years ago firebase-auth.js 6 years ago firebase-firestore.js 6 years ago firebase-wp-login.js 6 years ago phone.js 6 years ago
firebase-wp-login.js
38 lines
1
2 $fb_data = firebase_data;
3
4 jQuery(document).ready(function() {
5 var enable_firebase_login = $fb_data["enable_firebase_login"];
6 var disable_wp_login = $fb_data["disable_wp_login"];
7 var enable_admin_wp_login = $fb_data["enable_admin_wp_login"];
8
9 if( ( jQuery("#login_error").text().length === 0 || enable_firebase_login == 0 ) && ((!disable_wp_login) ||(disable_wp_login && enable_admin_wp_login) )) {
10 return;
11 }
12 if( disable_wp_login && !enable_admin_wp_login ) {
13 jQuery("#wp-submit").on("click", function(event) {
14 event.preventDefault();
15 mo_firebase_auth_do_fb_login();
16 });
17 } else if( ( jQuery("#login_error").text().length > 0 && enable_firebase_login ) ) {
18 mo_firebase_auth_do_fb_login();
19 }
20 });
21
22 function mo_firebase_auth_do_fb_login() {
23 var a_key = $fb_data["api_key"];
24 var pid = $fb_data["project_id"];
25 var email = document.getElementById("user_login").value;
26 var pass = document.getElementById("user_pass").value;
27 if( email.length === 0 ) {
28 email = $fb_data['log'];
29 }
30 if( pass.length === 0 ) {
31 pass = $fb_data['pwd'];
32 }
33 if( email.length > 0 && pass.length > 0 ) {
34 jQuery("#login_error").remove();
35 document.body.innerHTML = "Please wait...";
36 }
37 mo_firebase_auth_firebaseAuthentication( pid, a_key, email, pass, "" );
38 }