0
我已啓用在Asp.Net核心項目中使用Facebook
,Google
和Twitter
進行登錄。我也將相應的令牌保存到表AspNetUserTokens
。例如,我如何檢索Twitter令牌來代表用戶訪問Twitter API;沒有這個用戶登錄到Twitter,甚至在我使用Twitter API的時刻登錄到我的應用程序?在Asp.net核心標識上使用外部提供程序標記
我已啓用在Asp.Net核心項目中使用Facebook
,Google
和Twitter
進行登錄。我也將相應的令牌保存到表AspNetUserTokens
。例如,我如何檢索Twitter令牌來代表用戶訪問Twitter API;沒有這個用戶登錄到Twitter,甚至在我使用Twitter API的時刻登錄到我的應用程序?在Asp.net核心標識上使用外部提供程序標記
我一直在尋找進入SignInManager但尋找它在正確的地方是在的UserManager:
var accessToken = await _userManager.GetAuthenticationTokenAsync(user, "Twitter", "access_token");
var accessTokenSecret = await _userManager.GetAuthenticationTokenAsync(user, "Twitter", "access_token_secret");