簡體   English   中英

統一不提供用戶密碼和用戶名

[英]Unification not providing me user password and username

當我使用Instagram共享時,我如何從Instagram獲得用戶名和密碼(當前登錄用戶)。

$app = new UEApp(self::APP_SECRET, self::APP_SECRET);
$user = new UEUser($this->currentUser->unification_userkey, $this->currentUser->unification_usersecret);
$con = $access_token."@instagram.com/?username=rajneesh49&password=test&@instagram.com";

現在我使用靜態密碼和用戶名,然后它工作正常,但我如何獲得當前用戶名和密碼(由統一引擎提交)

用戶名和密碼都是統一引擎所必需的字段。

如何在php代碼中獲取此密碼和用戶名以進行統一引擎共享。

身份驗證僅提供此信息

Array
(
    [access_token] => 4544942713.7da612b.4de7a5a78fba2b27a60dc1749d
    [user] => Array
        (
            [id] => 45434542713
            [username] => rajneesh8469
            [profile_picture] => https://scontent.cdninstagram.com/t51.2885-19/s150x150/16229522_1877141895853233_7596497588304478208_a
.jpg
            [full_name] => Rajneesh
            [bio] => Testing website
            [website] => http://localhost:3000/
  ))

但只有密碼丟失,所以如何獲取當前用戶密碼。

我們可以看到您現在可以在添加連接時指定可選參數,並使用SDK的更新版本( https://github.com/unifiedinbox/ue-php-sdk )。

每個連接的可選參數在“添加連接”部分的文檔中指定https://developer.unificationengine.com/如果是instagram,可選參數是“用戶名”和“密碼”。

此問題與任何代碼或統一無關,僅與安全驗證有關。 我已經在相同的共享中修復了相同的問題但我通過身份驗證修復了這個問題,請根據應用程序在下面進行一些更改

  1. 創建Instagram身份驗證
  2. 獲取用戶名(僅用戶名驗證不提供密碼)
  3. 在退出應用程序中打開用戶驗證彈出窗口(然后顯示用戶名並詢問用戶請輸入密碼)
  4. 請不要在您的數據庫中保存用戶密碼(與安全相關)
  5. 然后使用相同的參數進行共享

只能根據密碼更改:

$con = $access_token."@instagram.com/?username=".$username.'&password='.$password&@instagram.com";

請按照安全社交網絡執行此操作,根據應用程序證明良好的安全性(根據安全性,Instagram是好的)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM