开发者

Storing Google passwords

开发者 https://www.devze.com 2023-02-09 06:08 出处:网络
Im writing a Django application that h开发者_StackOverflow中文版as a scheduling component. I want the user to be able to see his or her appointments on their Google Calendar. The appointments are sens

Im writing a Django application that h开发者_StackOverflow中文版as a scheduling component. I want the user to be able to see his or her appointments on their Google Calendar. The appointments are sensitive information so I cant make a publicly available .ics and use 'Add By URL' in gCal.

So Im left with asking the user for credentials and updating their gCal through the API. However Im a little wary about storing their username/pass in my database. Word on the street is this is not a good idea.

What do you think?


You're right, this is not a good idea. People don't want to give you their info and you don't want to be responsible for storing it and securing it. It's a situation that up until a few years ago was very common though. The site (like yours) doesn't REALLY want their password but you do want authorization to do something on the user's behalf.

OAuth will solve this problem for you. Basically it's a way for Google to do just that - grant you permission to act on a user's behalf without you having to ever know that user's credentials. There is plenty of documentation on how to do this but here is a good place to start: Authentication and Authorization for Google APIs

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号