As we all know one big advantage of MVC is stateless.
However if not using session, wher开发者_JS百科e should I save my accesstoken from facebook. since i want user to be able to post feed to their wall, which requires accesstoken for authentication.
Is there any best practice that i can follow?
thanks
I end up save fb accessToken in my database by requiring user facebook extended permission: offline_access
I dont know how to delete the question, so I put my solution up here.
See the StoreFacebookAuthToken method in this site.
I changed the code a bit and summarizing looked like this:
- Add Identity Claim Facebook:access_token on OnAuthenticated event
- Create a method to store the claim in database
- Call the created method from ExternalLoginCallback, LinkLoginCallBack and ExternalLoginConfirmation Actions
See the code here.
精彩评论