我应该在哪里存储登录数据? [英] Where should I store login Data?

查看:97
本文介绍了我应该在哪里存储登录数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个小型应用,可让用户输入他的Google帐户名和密码,并在他的Google云端硬盘帐户中向他显示​​可用的电子表格.

我想让用户能够保存以下数据:

  1. 是或否(如果自动连接到他的帐户).

  2. Google帐户名(电子邮件)

  3. 密码

我想这样做,所以程序启动时他不必再次写它们.

将这些数据保存在用户计算机上的推荐方法是什么?

(对不起,我的英语)

解决方案

应用程序开发人员切勿存储用户凭据. 当用户首次通过您的应用登录到Google帐户时,请从Google获取针对您的应用的OAuth 2密钥.将该密钥安全地存储在您的应用中.

有关Google API的更多详细信息

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.

I want to let the user the ability to save this following data:

  1. true or false, if to connect to his account automaticaly.

  2. Google Account Name(email)

  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. Store that key in your app securely.

More details about google API's here

这篇关于我应该在哪里存储登录数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆