OAuth Single Sign On – SSO (OAuth Client) Shortcode

Below, you’ll find a detailed guide on how to add the OAuth Single Sign On – SSO (OAuth Client) Shortcode to your WordPress website, including its parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the OAuth Single Sign On – SSO (OAuth Client) Plugin shortcode not to show or not to work correctly.

Before starting, here is an overview of the OAuth Single Sign On – SSO (OAuth Client) Plugin and the shortcodes it provides:

Plugin Icon
OAuth Single Sign On – SSO (OAuth Client)

"OAuth Single Sign On – SSO (OAuth Client) is a WordPress plugin facilitating seamless login through multiple platforms like Eve Online, Google, Facebook. Streamlines user authentication for enhanced security."

★★★★☆ (213) Active Installs: 4000+ Tested with: 6.3.2 PHP Version: 5.4
Included Shortcodes:
  • [mo_oauth_login]

OAuth Single Sign On – SSO (OAuth Client) [mo_oauth_login] Shortcode

The ‘mo_oauth_login’ shortcode from the miniorange-login-with-eve-online-google-facebook plugin allows users to log in via OAuth. It checks if the customer is registered and displays a message if they’re not.

Shortcode: [mo_oauth_login]

Examples and Usage

Basic example – A shortcode that allows you to add a login form to your site using the mo_oauth_login function.

[mo_oauth_login /]

The above shortcode will add a login form to your site. It will check if the user is already registered and if not, it will display a message saying that this feature is only supported in standard and higher versions. It also provides a link to the list of features.

PHP Function Code

In case you have difficulties debugging what causing issues with [mo_oauth_login] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'mo_oauth_login', array( $this, 'mo_oauth_shortcode_login' ) );

Shortcode PHP function:

function mo_oauth_shortcode_login() { if ( mooauth_migrate_customers() || ! mooauth_is_customer_registered() ) { return '<div class="mo_oauth_premium_option_text" style="text-align: center;border: 1px solid;margin: 5px;padding-top: 25px;"><p>This feature is supported only in standard and higher versions.</p> <p><a href="' . get_site_url( null, '/wp-admin/' ) . 'admin.php?page=mo_oauth_settings&tab=licensing">Click Here</a> to see our full list of Features.</p></div>'; } $mowidget = new MOOAuth_Widget(); return $mowidget->mo_oauth_login_form(); }

Code file location:

miniorange-login-with-eve-online-google-facebook/miniorange-login-with-eve-online-google-facebook/class-mooauth.php

Conclusion

Now that you’ve learned how to embed the OAuth Single Sign On – SSO (OAuth Client) Plugin shortcode, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *