Skip to content
Snippets Groups Projects
Commit 14b82405 authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Insert the zapier default server

parent 566fe9f2
No related branches found
No related tags found
No related merge requests found
if not RocketChat.models.OAuthApps.findOne('default-zapier')
RocketChat.models.OAuthApps.insert
_id: 'default-zapier'
name: 'Default: Zapier'
default: true
clientId: 'default-zapier'
clientSecret: 'RTK6TlndaCIolhQhZ7_KHIGOKj41RnlaOq_o-7JKwLr'
redirectUri: 'https://zapier.com/dashboard/auth/oauth/return/AppIDAPI/'
_createdAt: new Date
_createdBy:
_id: 'system'
username: 'system'
......@@ -8,12 +8,6 @@ oauth2server = new OAuth2Server
WebApp.connectHandlers.use oauth2server.app
# JsonRoutes.Middleware.use oauth2server.app
if not oauth2server.model.Clients.findOne()
oauth2server.model.Clients.insert
clientId: 'papers3'
clientSecret: '123'
redirectUri: 'http://localhost:3000/_oauth/rc'
oauth2server.routes.get '/account', oauth2server.oauth.authorise(), (req, res, next) ->
user = Meteor.users.findOne req.user.id
......
......@@ -23,6 +23,7 @@ Package.onUse(function(api) {
//// OAuth //
// Server
api.addFiles('oauth/server/oauth2-server.coffee', 'server');
api.addFiles('oauth/server/default-services.coffee', 'server');
api.addAssets('oauth/client/stylesheets/oauth2.less', 'server');
api.addFiles('oauth/client/stylesheets/load.coffee', 'server');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment