简体   繁体   English

如何在Rails / Cloud 9 IDE中安全地生成帐户激活链接

[英]How to safely generate account activation links in Rails / cloud 9 ide

I have been following the rails tutorial by Michael Hartl for some time. 我一直在关注Michael Hartl的rails教程。 When I came to the point of creating account activation links and automatically send them in an Email, I noticed some bad stuff: 当我谈到创建帐户激活链接并自动将其发送到电子邮件中时,我注意到了一些不好的地方:

I'm using the cloud 9 ide and the activation link from the Email only works when the cloud 9 project is private . 我正在使用cloud 9 ide,并且当cloud 9项目为private时,来自电子邮件的激活链接有效。 Since I need to store the password for my gmail account in the configs, everyone can view my code and log in to my gmail account. 由于我需要在配置中存储我的Gmail帐户的密码,因此每个人都可以查看我的代码并登录到我的Gmail帐户。

How could this problem be solved? 这个问题怎么解决? Making the project private doesn't work because you then aren't able to activate your account. 将项目设为私有是行不通的,因为这样便无法激活您的帐户。

If you'd like to keep your workspace private, but your application url public, just click on the 'Share' button near the top right of the IDE. 如果您想保持工作区的私密性,但是您的应用程序URL是公共的,只需单击IDE右上角附近的“共享”按钮。 Once there, check 'Public' next to 'Application'. 到达那里后,选中“应用程序”旁边的“公共”。 That will disable Cloud9's authentication when accessing the application url while keeping your code/workspace private. 这将在访问应用程序URL时禁用Cloud9的身份验证,同时保持您的代码/工作区私有。

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

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