Giter VIP home page Giter VIP logo

Comments (6)

v3n avatar v3n commented on August 30, 2024

Define a data structure that the Twilio controller accesses that goes in the config/environment.rb file. Ideally, it should allow the sandbox to be accessible during test and development for the rails environment. However, that's optional.

Are your personal account credentials something that need to be stripped out of the github repository totally?

from medlink.

clintslee avatar clintslee commented on August 30, 2024

The SMS class needs three pieces of info:

  1. Twilio Account SID : A string that's now in env variable TWILIO_ACCOUNT_SID.
  2. Twilio Auth : A string that's now in env variable TWILIO_AUTH.
  3. Phone number : hard-coded in the source.

Look at SMS.send and it'll be apparent how these are used.

Yes, my credentials need to be stripped from github. I added an initializer file in the beginning and then deleted it shortly after so I know they're visible in the earlier commits.

from medlink.

v3n avatar v3n commented on August 30, 2024

Okay, I'll have to filter the branch and force a push at some point, which is likely to be bad, so we'll hold that off until we know we have everyone's work from the weekend pushed. Give it until Wednesday and I'll then fix this problem.

from medlink.

jamesdabbs avatar jamesdabbs commented on August 30, 2024

In general, we need to remove any sensitive config variables from the repo - AFAIK, that's Twilio stuff and the app secret key (usually production DB credentials too, but Heroku injects those). dotenv is a good tool for this. @clintslee be aware that your Twilio credentials will still be accessible by looking at older commits; to be totally secure, you may want to reset them.

I'm not sure what the easiest way to do local sandbox testing with Twilio is, but I'm planning on setting that up for myself fairly soon and will report back if I uncover anything helpful.

from medlink.

v3n avatar v3n commented on August 30, 2024

@clintslee be aware that your Twilio credentials will still be accessible by looking at older commits

They won't be after I filter the repository.

from medlink.

jamesdabbs avatar jamesdabbs commented on August 30, 2024

I personally wouldn't bother with rewriting the history. Those credentials could have been copied by anyone on the internet at this point, and retconning the repo is just asking for weird merge problems down the road.

Regardless, as of 7d301ff I've got Twilio working on my local machine. I added added some info in the README about how to set it up and would highly recommend localtunnel, but I don't think it needs to be in the project proper.

bd96a35 also adds an environment-set secret token, for similar reasons. The token on Heroku has been duly updated.

from medlink.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.