FireMobile- WordPress & WooCommerce firebase mobile OTP authentication

Contents

1. Send love to our product

2. How to redirect after Login?

3. Error! Invalid mobile number

4. How to put the shortcode in WooCoomerce login form?

5. Can I get a Refund?

6. Database URL?

7. How to change button text?

8. Error! Invalid mobile number

1. Send love to our product

Hope you have liked our product. Our engineering & technical support team puts great effort to create the best product in the market with continuous effort to improve it each day for our users. We will really appreciate it if you can show your appreciation for our product by sending us a 5-star rating at Envato. Good feedbacks encourage the whole team to improve the product better.  You can send us your feedback from this link https://codecanyon.net/downloads under the Download button here https://monosnap.com/file/IjKAVXsi5Ej9Xrx0zkQt9Cl1cc0R39.

2. How to redirect after Login?

This question has two answers based on if you are using WooCommerce or not

1. If you are using WooCommerce:

You need to put the firemobile shortcode in the WooCommerce login form then it will automatically redirect the user to the my account page after login and the continue with phone button will disappear. 

Now to put the firemobile shortcode in the WooCommerce login form follow the below approach, 

You can do it in two way,

I)  apply the below code in your theme functions.php file 

function action_woocommerce_login_form_end()
{
    // make action magic happen here...
    do_shortcode('[firebase_otp_login]');
};
// add the action
add_action('woocommerce_login_form_end', 'action_woocommerce_login_form_end', 10, 0);

II) you should override the WooCommerce template

You can override pretty much every WooCommerce template by copying them into a folder named "WooCommerce" in your theme.

This is documented at Template structure & Overriding templates via a theme.

The login and register forms non-logged in users see when they click "my account" are genetared by the template file /myaccount/form-login.php

So what you need to do is copy this file from the directory to your theme's directory (so it is /yourtheme/woocommerce/myaccount/form-login.php) and from there edit it as desired.

In this case, you will want to put the shortcode after the Login button.



2. If you are not using WooCommerce:

In this case, you need to put the [firebase_otp_login] shortcode in your desired place just make sure the shortcode shows up when user is not logged in using the below code 

if ( !is_user_logged_in() ) {
    do_shortcode('[firebase_otp_login]');
}

Now once the user verifies the OTP it will reload the current page and log in to the user. But if you want to redirect to a particular page you should make changes in the below js file

/wp-content/plugins/FireMobile/assets/js/wfotp-core.js in 321 line


3. Error! Invalid mobile number

in your firebase custom domain section make sure you have added your host domain + www.yourdomain.com.

here www before the domain is very important. if you have www in your domain your need to add it in the custom domain.

4. How to put the shortcode in WooCoomerce login form?

You need to put the firemobile shortcode in the WooCommerce login form then it will automatically redirect the user to the my account page after login and the continue with phone button will disappear. 

Now to put the firemobile shortcode in the WooCommerce login form follow the below approach, 

You can do it in two way,

I)  apply the below code in your theme functions.php file 

function action_woocommerce_login_form_end()
{    
    // make action magic happen here...    
    do_shortcode('[firebase_otp_login]');
};
// add the action
add_action('woocommerce_login_form_end', 'action_woocommerce_login_form_end', 10, 0);

II) you should override the WooCommerce template

You can override pretty much every WooCommerce template by copying them into a folder named "WooCommerce" in your theme.

This is documented at Template structure & Overriding templates via a theme.

The login and register forms non-logged in users see when they click "my account" are genetared by the template file /myaccount/form-login.php

So what you need to do is copy this file from the directory to your theme's directory (so it is /yourtheme/woocommerce/myaccount/form-login.php) and from there edit it as desired.

In this case, you will want to put the shortcode after the Login button.

Note: If you are using any Custom theme and the above solution not working for you then you need to contact the theme developer.

5. Can I get a Refund?

Unfortunately, we don't provide Refund except if you can have a detailed discussion with the support team and you can prove to them there is a bug that is stopping you from releasing or using our product. In order to consider for refund, the feature needs to be available in our product and there needs to be a genuine bug with valid proof that the bug is available. This is the only case which we may consider for a refund but it's very rare as most of the features you will use is very stable for years now and lots of users are using them on regular basis.  Also, any issue or bug that is only not working for your case but working on our site and other user's sites is not considered for a refund. A third-party plugin or theme conflict is also not considered for a refund. 


6. Database URL?

To generate a database URL you need to go to the Firestore DB and click on the Getting started button. Once it's done you can check your config and find the database URL there.

7. How to change button text?

To change 'continue with phone' text just use the shortcode and change your text like below

[firebase_otp_login phone_toggle_button_text="your text here"]

To change other text please check our docs shortcode parameters section,

  1.  'phone_button_text' => default value 'Send Code' 
  2.  'code_button_text' => default value 'Verify & Login', 
  3.  'phone_toggle_button_text' => default value 'Continue with Phone', 
  4.  'recaptcha' => default value 'invisible', // invisible or normal 

8. Error! Invalid mobile number

in your firebase custom domain section make sure you have added your host domain + www.yourdomain.com.

here www before the domain is very important. if you have www in your domain your need to add it in the custom domain.