Social Login WordPress Plugin – AccessPress Social Login Lite - Version 3.0.9

Version Description

  • Done the bug fixing for the facebook login.
Download this release

Release Info

Developer Access Keys
Plugin Icon 128x128 Social Login WordPress Plugin – AccessPress Social Login Lite
Version 3.0.9
Comparing to
See all releases

Code changes from version 3.0.8 to 3.0.9

accesspress-social-login-lite.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php defined( 'ABSPATH' ) or die( "No script kiddies please!" );
2
  /*
3
- Plugin name: AccessPress Social Login Lite
4
  Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-social-login-lite/
5
  Description: A plugin to add various social logins to a site.
6
- version: 3.0.8
7
  Author: AccessPress Themes
8
  Author URI: https://accesspressthemes.com/
9
  Text Domain: accesspress-social-login-lite
@@ -12,7 +12,7 @@
12
  */
13
  //Declearation of the necessary constants for plugin
14
  if( !defined( 'APSL_VERSION' ) ) {
15
- define( 'APSL_VERSION', '3.0.8' );
16
  }
17
 
18
  if( !defined( 'APSL_IMAGE_DIR' ) ) {
1
  <?php defined( 'ABSPATH' ) or die( "No script kiddies please!" );
2
  /*
3
+ Plugin name: Social Login WordPress Plugin - AccessPress Social Login Lite
4
  Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-social-login-lite/
5
  Description: A plugin to add various social logins to a site.
6
+ version: 3.0.9
7
  Author: AccessPress Themes
8
  Author URI: https://accesspressthemes.com/
9
  Text Domain: accesspress-social-login-lite
12
  */
13
  //Declearation of the necessary constants for plugin
14
  if( !defined( 'APSL_VERSION' ) ) {
15
+ define( 'APSL_VERSION', '3.0.9' );
16
  }
17
 
18
  if( !defined( 'APSL_IMAGE_DIR' ) ) {
inc/frontend/login_check.php CHANGED
@@ -85,8 +85,7 @@ if( !class_exists( 'APSL_Lite_Login_Check_Class' ) ) {
85
  $height = 150;
86
  }
87
 
88
- $config = array('app_id' => $options['apsl_facebook_settings']['apsl_facebook_app_id'], 'app_secret' => $options['apsl_facebook_settings']['apsl_facebook_app_secret'], 'default_graph_version' => 'v2.4');
89
-
90
  include( APSL_PLUGIN_DIR . 'facebook/autoload.php' );
91
  $fb = new Facebook\Facebook( $config );
92
 
@@ -115,6 +114,8 @@ if( !class_exists( 'APSL_Lite_Login_Check_Class' ) ) {
115
  }
116
  if( isset( $_REQUEST['code'] ) ) {
117
  $helper = $fb->getRedirectLoginHelper();
 
 
118
  try {
119
  $accessToken = $helper->getAccessToken();
120
  }
@@ -133,7 +134,7 @@ if( !class_exists( 'APSL_Lite_Login_Check_Class' ) ) {
133
  // Logged in!
134
  $_SESSION['facebook_access_token'] = (string)$accessToken;
135
  $fb->setDefaultAccessToken( $accessToken );
136
-
137
  try {
138
  $response = $fb->get( '/me?fields=email,name, first_name, last_name, gender, link, about, bio, birthday, education, hometown, is_verified, languages, location, website' );
139
  $userNode = $response->getGraphUser();
85
  $height = 150;
86
  }
87
 
88
+ $config = array('app_id' => $options['apsl_facebook_settings']['apsl_facebook_app_id'], 'app_secret' => $options['apsl_facebook_settings']['apsl_facebook_app_secret'], 'default_graph_version' => 'v2.4', 'persistent_data_handler' => 'session' );
 
89
  include( APSL_PLUGIN_DIR . 'facebook/autoload.php' );
90
  $fb = new Facebook\Facebook( $config );
91
 
114
  }
115
  if( isset( $_REQUEST['code'] ) ) {
116
  $helper = $fb->getRedirectLoginHelper();
117
+ // Trick below will avoid "Cross-site request forgery validation failed. Required param "state" missing." from Facebook
118
+ $_SESSION['FBRLH_state'] = $_REQUEST['state'];
119
  try {
120
  $accessToken = $helper->getAccessToken();
121
  }
134
  // Logged in!
135
  $_SESSION['facebook_access_token'] = (string)$accessToken;
136
  $fb->setDefaultAccessToken( $accessToken );
137
+
138
  try {
139
  $response = $fb->get( '/me?fields=email,name, first_name, last_name, gender, link, about, bio, birthday, education, hometown, is_verified, languages, location, website' );
140
  $userNode = $response->getGraphUser();
js/backend.js CHANGED
@@ -17,17 +17,17 @@ jQuery(document).ready(function($){
17
  $('.apsl-label').click(function(){
18
  $(this).closest('.apsl-settings').find('.apsl_network_settings_wrapper').toggle('slow', function(){
19
  if ($(this).closest('.apsl-settings').find('.apsl_network_settings_wrapper').is(':visible')) {
20
- $(this).closest('.apsl-settings').find('.apsl_show_hide i').removeClass('fa-caret-down');
21
- $(this).closest('.apsl-settings').find('.apsl_show_hide i').addClass('fa-caret-up');
22
- } else {
23
- $(this).closest('.apsl-settings').find('.apsl_show_hide i').removeClass('fa-caret-up');
24
- $(this).closest('.apsl-settings').find('.apsl_show_hide i').addClass('fa-caret-down');
25
- }
26
 
27
  });
28
  });
29
 
30
- // for hide show options based on logout redirect options
31
  $('.apsl_custom_logout_redirect_options').click(function(){
32
  if($(this).val()==='custom_page') {
33
  $('.apsl-custom-logout-redirect-link').show('slow');
@@ -36,7 +36,7 @@ jQuery(document).ready(function($){
36
  }
37
  });
38
 
39
- // for hide show options based on logout redirect options
40
  $('.apsl_custom_login_redirect_options').click(function(){
41
  if($(this).val()==='custom_page') {
42
  $('.apsl-custom-login-redirect-link').show('slow');
17
  $('.apsl-label').click(function(){
18
  $(this).closest('.apsl-settings').find('.apsl_network_settings_wrapper').toggle('slow', function(){
19
  if ($(this).closest('.apsl-settings').find('.apsl_network_settings_wrapper').is(':visible')) {
20
+ $(this).closest('.apsl-settings').find('.apsl_show_hide i').removeClass('fa-caret-down');
21
+ $(this).closest('.apsl-settings').find('.apsl_show_hide i').addClass('fa-caret-up');
22
+ }else {
23
+ $(this).closest('.apsl-settings').find('.apsl_show_hide i').removeClass('fa-caret-up');
24
+ $(this).closest('.apsl-settings').find('.apsl_show_hide i').addClass('fa-caret-down');
25
+ }
26
 
27
  });
28
  });
29
 
30
+ // for hide show options based on logout redirect options
31
  $('.apsl_custom_logout_redirect_options').click(function(){
32
  if($(this).val()==='custom_page') {
33
  $('.apsl-custom-logout-redirect-link').show('slow');
36
  }
37
  });
38
 
39
+ // for hide show options based on logout redirect options
40
  $('.apsl_custom_login_redirect_options').click(function(){
41
  if($(this).val()==='custom_page') {
42
  $('.apsl-custom-login-redirect-link').show('slow');
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === AccessPress Social Login Lite ===
2
  Contributors: Access Keys
3
  Tags: social, login, social login, facebook, twitter, google, social connect, social network login, register, login with, signin, oauth, authorize, oauth
4
  Donate link: http://accesspressthemes.com/donation/
5
  Requires at least: 3.8
6
  Tested up to: 4.5
7
- Stable tag: 3.0.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -133,6 +133,9 @@ Yes. You can use the AccessPress social login lite anywhere by using shortcode i
133
  4. Backend Other settings Section.
134
 
135
  == Changelog ==
 
 
 
136
  = 3.0.8 =
137
  * Modified facebook app creation note section.
138
 
1
+ === Social Login WordPress Plugin - AccessPress Social Login Lite ===
2
  Contributors: Access Keys
3
  Tags: social, login, social login, facebook, twitter, google, social connect, social network login, register, login with, signin, oauth, authorize, oauth
4
  Donate link: http://accesspressthemes.com/donation/
5
  Requires at least: 3.8
6
  Tested up to: 4.5
7
+ Stable tag: 3.0.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
133
  4. Backend Other settings Section.
134
 
135
  == Changelog ==
136
+ = 3.0.9 =
137
+ * Done the bug fixing for the facebook login.
138
+
139
  = 3.0.8 =
140
  * Modified facebook app creation note section.
141