Advertisement:

Author Topic: Facebook redirect error  (Read 6069 times)

encontra

  • Newbie
  • *
  • Posts: 19
Facebook redirect error
« on: July 10, 2015, 06:21:52 pm »
Hi!

After setting up the plugin and the app developer on Facebook, I tried to create an account in the store using facebook.

After the permission screen to use facebook it is normally redirected back to the site, but since this morning it is no longer happening. It simply displays a blank screen and does not create the user (see the attachment).

I did this configuration and testing in 4 different servers, each of different hosts, and yesterday were functioning normally.

I contacted each of the hosts and all said that no change was made on the servers.

You can tell what might be happening?

Tks

Wachimiro

  • Newbie
  • *
  • Posts: 9
Re: Facebook redirect error
« Reply #1 on: July 11, 2015, 11:41:56 pm »
I have the same problem http://forums.osclass.org/facebook-connect/facebook-plugin-error-redirect/ I thought it was my hosting provider Hostinger, but maybe facebook has changed something or the plugin is using an old facebook service that no longer works for the new facebook developer accounts.
« Last Edit: July 11, 2015, 11:58:58 pm by Wachimiro »

Taisson

  • Newbie
  • *
  • Posts: 5
Re: Facebook redirect error
« Reply #2 on: July 14, 2015, 09:24:04 pm »
same problem

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: Facebook redirect error
« Reply #3 on: July 15, 2015, 12:06:31 am »
@encontra
Enable debug mode, check error log and place related problems there.

@Wachimiro
hostinger....

encontra

  • Newbie
  • *
  • Posts: 19
Re: Facebook redirect error
« Reply #4 on: July 15, 2015, 12:57:56 am »
Hi! Thanks for answer! Here is the log:

[14-Jul-2015 17:52:35 America/Sao_Paulo] CSRF state token does not match one provided.

Its just that..

yemenifree

  • Newbie
  • *
  • Posts: 3
Re: Facebook redirect error
« Reply #5 on: July 15, 2015, 02:46:53 am »
hello,

the problem from plugin

it's happens when facebook doesn't return email of user , so the osclass can't create new user without email

there are many reasons the facebook doesn't return the email, the one of them is if user does not confirmed his account from email

pls contact with author of plugin to fix it or use my plugin "OSclass Social Auth" but it's not free  (sorry)



« Last Edit: July 15, 2015, 02:49:53 am by yemenifree »

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: Facebook redirect error
« Reply #6 on: July 15, 2015, 03:17:12 pm »
@encontra
Look on forums for this error, there are many topics about it.

@yemenifree
You are not correct.

encontra

  • Newbie
  • *
  • Posts: 19
Re: Facebook redirect error
« Reply #7 on: July 15, 2015, 06:12:45 pm »
@frosticek
I researched for this problem in the forum before opening this topic, and tried some of the solutions had here, but without success.
Any other suggestions besides those on this board?

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: Facebook redirect error
« Reply #8 on: July 15, 2015, 07:19:08 pm »
@encontra
Well those tokens are little nighmare, it happened to me that tokens blocked front & backoffice for my demo site. It is very hard to disable them, but possible, I explained it there:
http://forums.osclass.org/installation-update-help/invalid-csrf-token/90/

encontra

  • Newbie
  • *
  • Posts: 19
Re: Facebook redirect error
« Reply #9 on: July 15, 2015, 09:56:31 pm »
- added class="nocsfr" to every form in front office
apparently in version 3.5.3 forms of front office already with the class.

- commentent whole body of function osc_csrf_check in oc-includes/osclass/helpers/hSecurity.php
This is how it should be the function "osc_csrf_check"? If it did not work, the problem continues, plumb erasing entire cache and cookies.

Code: [Select]
function osc_csrf_check() {
        /*$error      = false;
        $str_error  = '';
        if(Params::getParam('CSRFName')=='' || Params::getParam('CSRFToken')=='') {
            $str_error = _m('Probable invalid request.') ;
            $error = true;
        } else {
            $name   = Params::getParam('CSRFName');
            $token  = Params::getParam('CSRFToken');
            if (!osc_csrfguard_validate_token($name, $token)) {
                $str_error = _m('Invalid CSRF token.');
                $error = true;
            }
        }

        if( defined('IS_AJAX') ) {
            if($error && IS_AJAX === true ) {
                echo json_encode(array(
                    'error' => 1,
                    'msg'   => $str_error
                ));
                exit;
            }
        }

        // ¿ check if is ajax request ?
        if($error) {
            if(OC_ADMIN) {
                osc_add_flash_error_message($str_error, 'admin');
            } else {
                osc_add_flash_error_message($str_error);
            }

            $url = osc_get_http_referer();
            // be sure that drop session referer
            Session::newInstance()->_dropReferer();
            if($url!='') {
                osc_redirect_to($url);
            }

            if(OC_ADMIN) {
                osc_redirect_to( osc_admin_base_url(true) );
            } else {
                osc_redirect_to( osc_base_url(true) );
            }
        }*/
    }
« Last Edit: July 15, 2015, 10:26:12 pm by encontra »

encontra

  • Newbie
  • *
  • Posts: 19
Re: Facebook redirect error
« Reply #10 on: July 17, 2015, 11:24:13 pm »
?

Taisson

  • Newbie
  • *
  • Posts: 5
Re: Facebook redirect error
« Reply #11 on: July 18, 2015, 03:08:10 am »
the error is still some solution?

encontra

  • Newbie
  • *
  • Posts: 19
Re: Facebook redirect error
« Reply #12 on: July 20, 2015, 04:53:27 pm »
In my case the solutions suggested have not resolved the problem.
I'm still waiting for a new trial, I do not know the OsClass.

Taisson

  • Newbie
  • *
  • Posts: 5
Re: Facebook redirect error
« Reply #13 on: July 22, 2015, 05:36:40 am »
Someone could resolve this error?

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: Facebook redirect error
« Reply #14 on: July 22, 2015, 11:57:00 am »
@Taisson
If problem is caused by Facebook Connect plugin only, try to use different version of it, there are many of them that can be found on forums.