1
0
mirror of https://github.com/fazo96/markcloud.git synced 2025-01-09 10:59:52 +01:00

use meteor settings instead of custom source file

This commit is contained in:
Enrico Fasoli 2015-08-18 12:27:07 +02:00
parent 92b14abe4d
commit a17c88a0d0
3 changed files with 19 additions and 8 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
settings.json

View File

@ -20,17 +20,19 @@ since the apps now depends on Meteor's
#### Twitter Authentication
Create this file: `server/settings.coffee` with this content:
Create a `json` file with this content:
```coffeescript
Meteor.startup ->
Accounts.loginServiceConfiguration.remove service : 'twitter'
Accounts.loginServiceConfiguration.insert
service: 'twitter'
consumerKey: 'Your API key'
secret: 'Your API secret'
```json
{
"twitter" : {
"apiKey": "your_twitter_api_key",
"secret": "your_twitter_api_secret"
}
}
```
Now run or deploy the application with the `--settings yourfile.json` parameter.
Your users will now be able to login using twitter. You may want to disable the
button if you don't configure twitter authentication.

View File

@ -28,3 +28,11 @@ Accounts.emailTemplates.verifyEmail.text = (user,url) ->
url = Meteor.absoluteUrl 'verify/'+token
'''Welcome to MarkCloud! To activate your account, click on the \
following link: '''+url
# Twitter configuration code
Meteor.startup ->
Accounts.loginServiceConfiguration.remove service : 'twitter'
if Meteor.settings.twitter? then Accounts.loginServiceConfiguration.insert
service: 'twitter'
consumerKey: Meteor.settings.twitter.apiKey
secret: Meteor.settings.twitter.secret