简体   繁体   English

我应该在哪里存储登录数据?

[英]Where should I store login Data?

I'm creating a small app that let the user enter his Google account Name and Password and show him available spreadsheets on his Google Drive Account. 我正在创建一个小型应用,该应用可以让用户输入他的Google帐户名和密码,并在他的Google云端硬盘帐户中向他显示​​可用的电子表格。

I want to let the user the ability to save this following data: 我想让用户能够保存以下数据:

  1. true or false, if to connect to his account automaticaly. 如果要自动连接到他的帐户,则为true或false。

  2. Google Account Name(email) Google帐户名称(电子邮件)

  3. Password 密码

I want to do this, so he doesn't have to write them again when the program start. 我想这样做,所以他不必在程序启动时再次写它们。

What is the reccommended way to save this data on the user computer? 在用户计算机上保存此数据的建议方法是什么?

(sorry for my english) (对不起我的英语不好)

Application developers should never store user credentials. 应用程序开发人员永远不要存储用户凭据。 Please get an OAuth 2 key for your application from google, when the user logins to google account via your app for the first time. 当用户首次通过您的应用登录到Google帐户时,请从Google获取针对您的应用的OAuth 2密钥。 Store that key in your app securely. 将该密钥安全地存储在您的应用中。

More details about google API's here 关于谷歌API的更多细节在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM