Rails and the hidden credentials
Moving away from ENV One of the challenges that cropped up during this projects was that we had to use Omniauth to allow a user to sign in via Facebook, Google, or the like. Problem I had was that even after following online tutorials it still wasn't functioning as it should. Through trial and error I discovered that it had something to do with using the ENV variable. After doing my homework there was a lot of suggestions to use the new Rails Credentials setup. This was a bit more difficult as adding credentials to the credentials.yml.enc file isn't as simple as just pasting them in. First you have to get into your credentials.yml.enc file. If you just open it you'll notice it has a single line of hexadecimal code. Do not edit this directly. To edit this file you'l need to enter the follow command in your terminal: EDITOR="atom --wait" rails credentials:edit Replace "atom" with your own editor. This will bring up the file you need to ...