1
0
mirror of https://github.com/fazo96/markcloud.git synced 2025-01-10 11:04:21 +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 #### Twitter Authentication
Create this file: `server/settings.coffee` with this content: Create a `json` file with this content:
```coffeescript ```json
Meteor.startup -> {
Accounts.loginServiceConfiguration.remove service : 'twitter' "twitter" : {
Accounts.loginServiceConfiguration.insert "apiKey": "your_twitter_api_key",
service: 'twitter' "secret": "your_twitter_api_secret"
consumerKey: 'Your API key' }
secret: 'Your 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 Your users will now be able to login using twitter. You may want to disable the
button if you don't configure twitter authentication. 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 url = Meteor.absoluteUrl 'verify/'+token
'''Welcome to MarkCloud! To activate your account, click on the \ '''Welcome to MarkCloud! To activate your account, click on the \
following link: '''+url 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