django & facebook: security & design for a facebook webapp that performs a third party login on behalf of the user

后端 未结 3 2124
无人共我
无人共我 2021-01-21 22:57

I\'m writing a Facebook canvas webapp that performs a login (using urllib) to a third party website and performs actions on behalf of the user. This means I have 2 accounts; the

相关标签:
3条回答
  • 2021-01-21 23:13

    I guess you could store the logins ONLY on the client, in some sort of local storage and do all the actions related to the third party, from the client in JS.

    This of course would need some change in the architecture of your app if you tought to do all this from your server, but that would possible for sure, you can event make client JS send data to your server after it worked so you can log data from the interactions with the 3rd party.

    Furthermore it has the advantage of distributing the load on the clients

    I know you didn't tag the question with javascript and you seem to want a server pure solution, but It seems the best solution to me. the user keeps its data ..

    0 讨论(0)
  • 2021-01-21 23:19

    Security through obscurity might be your best bet. Perhaps implement an algorithm to generate the key using something standard (like the current datetime). You can store the date in your db, and use that to generate the key using your own algorithm.

    0 讨论(0)
  • 2021-01-21 23:22

    You might as well encrypt it using a key on the server. If anyone gains access to your server they will have everything they need to retrieve the key even if you're getting it from Facebook.

    I think the best you can do is to store the key in a location that isn't available to your webserver, but that is available to your script. At least make sure you don't store the key in the database.

    Whatever you do beyond that would just be security through obscurity. The key here is to keep your server secure so that no one gains access to it.

    0 讨论(0)
提交回复
热议问题