Comments (6)
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.
The SMS class needs three pieces of info:
- Twilio Account SID : A string that's now in env variable TWILIO_ACCOUNT_SID.
- Twilio Auth : A string that's now in env variable TWILIO_AUTH.
- 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.
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.
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.
@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.
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)
- Add SMS order confirmation for orders placed on the web
- Add PCMO Extra Information Text to API output HOT 1
- Remove case sensitivity of bulk uploads - time_zone
- Bulk uploads with new phone numbers should replace existing phone numbers
- Add date picker for order history reports download HOT 1
- Restore "inactive user" filtering in new roster HOT 1
- Add path to viewing volunteer order history in users page HOT 2
- Scheduled announcement text displaying on non-scheduled annoucement HOT 3
- https doesn't seem to cover www.pcmedlink.org
- SMS Messages being sent to Inactive users HOT 3
- Deleted phone numbers reappear after page refresh HOT 2
- Add multiple phone numbers and active/inactive to user report HOT 1
- Positive Responses Logic HOT 1
- Grant Message Tester access to PCMO level
- Roster uploads lead to application error HOT 2
- Combine External CSS files to improve performance
- Announcement Button Displays incorrect number of users HOT 1
- Display only users inactivated by a roster upload on confirmation screen
- Announcement Scheduler not functioning
- Duplicate Phone numbers being added to users upon bulk upload HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from medlink.