【发布时间】:2015-03-11 15:19:06
【问题描述】:
这个问题的可能原因是什么?我遵循this totorial 使用 HybridAuth 和 Laravel 4 通过 LinkedIn 进行身份验证。
我收到此消息:身份验证失败! LinkedIn 返回了一个无效的令牌。
任何想法,也许是因为 localhost 配置?
**//Configuration Part**
<?php
return
array(
"base_url" => URL::to('http://localhost:8000/social/auth'),
"providers" => array (
"LinkedIn" => array (
"enabled" => true,
"keys" => array ( "key" => "xxx", "secret" => "xxx"),
"scope" => 'r_basicprofile, r_emailaddress'
)
),
// if you want to enable logging, set 'debug_mode' to true then provide a writable file by the web server on "debug_file"
"debug_mode" => false,
"debug_file" => "",
);
?>
在 LinkedIn Api 我得到以下密钥:
消费者密钥/API 密钥: 75tgxxxasdfeulcip
消费者秘密/密钥: JtOXIXasdfasdfgpyFvi7
OAuth 1.0a 用户令牌: 7b5955fe-6afc-4120-b148-55casdfasdf
OAuth 1.0a 用户密码: c7824d63-46c2-4549-bce1-8f5casdfasdf
在 HybridConfig 中,我使用的是 Consumer Key & Secret?!我必须在 config Array 中使用 Oauth1.0a 吗?
更新:我最终使用了Oauth2-Client。
最佳男主
【问题讨论】:
-
是的,你的问题;还要确保在将它们发布到此处后生成新的...
-
我把它们改成了 asdf,最好的 M
标签: php laravel-4 linkedin hybridauth