I always get a notice, but the opauth works fine.

599 views
Skip to first unread message

Abhishek Bhardwaj

unread,
Dec 17, 2012, 9:00:58 AM12/17/12
to opa...@googlegroups.com
I always get the following error notice:


Notice: No strategy is requested. Try going to https://mietabhishek.redirectme.net/mobile/za/live to authenticate with Live in C:\wamp\www\mobile\za\lib\Opauth\Opauth.php on line 125

Here the 'live' accordingly changes to the name which I mention last in Strategies, suppose if I add facebook's strategy at the end of opauth.conf.php , it will show:


Notice: No strategy is requested. Try going to https://mietabhishek.redirectme.net/mobile/za/facebook to authenticate with Facebook in C:\wamp\www\mobile\za\lib\Opauth\Opauth.php on line 125

Although the opauth works perfectly, but on jQuery Mobile's websites it makes problem. And also the error doesn't looks good on production websites.

Please help, thanks,




U-Zyn Chua

unread,
Dec 17, 2012, 11:30:26 AM12/17/12
to opa...@googlegroups.com
You may want to set
'path' => '/mobile/za/' to opauth.conf.php.

Message has been deleted

Abhishek Bhardwaj

unread,
Dec 17, 2012, 11:44:47 AM12/17/12
to opa...@googlegroups.com
Hello, I have already tried that:
<?php
$config = array(
    'path' => '/mobile/za/',

    'callback_url' => '{path}callback.php',

    'security_salt' => '
xxxxx',
       

    'Strategy' => array(
        'Facebook' => array(
            'app_id' => 'xxxxx',
            'app_secret' => 'xxxxxxxxx',
            'scope'    => 'email'
        ),
       
        'Google' => array(
            'client_id' => 'xxxxxxxxxxxxxx',
            'client_secret' => 'xxxxxxxxxxxxx'
        ),
        'LinkedIn' => array(
            'api_key' => 'xxxxxxxxxx',
            'secret_key' => 'xxxxxxxxxx'
        ),
       
        'Live' => array(
            'client_id' => 'xxxxxxxxxxx',
            'client_secret' => 'xxxxxxxxxxxxxx'
        )               
    )
);

U-Zyn Chua

unread,
Dec 17, 2012, 11:57:23 AM12/17/12
to opa...@googlegroups.com
What is the URL that you called?

Abhishek Bhardwaj

unread,
Dec 17, 2012, 12:01:20 PM12/17/12
to opa...@googlegroups.com
Sir the https://mietabhishek.redirectme.net/mobile/za/live is working fine, but I wanted to list the options through which the user can log in, and the list is being shown at https://mietabhishek.redirectme.net/mobile/za/
You can also visit my url.

U-Zyn Chua

unread,
Dec 17, 2012, 12:08:38 PM12/17/12
to opa...@googlegroups.com
Place your list elsewhere so that it doesn't go through Opauth, eg. https://mietabhishek.redirectme.net/mobile/index.html

Abhishek Bhardwaj

unread,
Dec 17, 2012, 12:15:28 PM12/17/12
to opa...@googlegroups.com
Thanks, Worked, what I did is:
I changed .htaccess to:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ htaccess.php [QSA,L]
</IfModule>
As you can see, I replaced index.php with htaccess.php, and then I did pasted the following contents inside htaccess.php(instead of pasting inside index.php):
<?php
    define('CONF_FILE', dirname(__FILE__).'/'.'opauth.conf.php');
    define('OPAUTH_LIB_DIR', dirname(__FILE__).'/lib/Opauth/');
    if (!file_exists(CONF_FILE)){
        trigger_error('Config file missing at '.CONF_FILE, E_USER_ERROR);
        exit();
    }
    require CONF_FILE;
    require OPAUTH_LIB_DIR.'Opauth.php';
    $Opauth = new Opauth( $config );
?>
Hope this may help to others.
hanks again, great work from your side.
Reply all
Reply to author
Forward
0 new messages