Search code examples
ruby-on-railsgmailrailstutorial.orgcloud9-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. 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. 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.

How could this problem be solved? Making the project private doesn't work because you then aren't able to activate your account.


Solution

  • 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. Once there, check 'Public' next to 'Application'. That will disable Cloud9's authentication when accessing the application url while keeping your code/workspace private.