ef2k / meteor-ddp Goto Github PK
View Code? Open in Web Editor NEWA promise-based client for Meteor's Distributed Data Protocol (DDP).
License: MIT License
A promise-based client for Meteor's Distributed Data Protocol (DDP).
License: MIT License
its absolutely necessary.
I can't see to get it working with Google. An example would be super helpful if you happened to have it around.
I'm trying
ddp.loginWithOauth(
//setup the twitter oauth login url
function (credentialToken) {
var callbackUrl = "http://localhost:3000/_oauth/google?close&state=" + credentialToken;
var loginUrl = "http://localhost:3000/_oauth/google/?requestTokenAndRedirect="
+ encodeURIComponent(callbackUrl)
+ "&state=" + credentialToken;
return loginUrl;
}
)
A window pops up for a second and disappears.
On the server side I see:
W20141126-22:30:07.104(-8) (oauth_server.js:78) Unable to parse state from OAuth query: -�o;avF·ªÚ
W20141126-22:30:07.117(-8) (oauth_server.js:78) Unable to parse state from OAuth query: -�o;avF·ªÚ
W20141126-22:30:07.121(-8) (oauth_server.js:78) Unable to parse state from OAuth query: -�o;avF·ªÚ
W20141126-22:30:07.122(-8) (oauth_server.js:398) Error in OAuth Server: Failed to complete OAuth handshake with Google. failed [400] { "error" : "invalid_grant", "error_description" : "Code was already redeemed." }
I20141126-22:30:07.531(-8)? Exception while invoking method 'login' Error: Match error: Missing key 'credentialSecret'
I20141126-22:30:07.531(-8)? at packages/check/match.js:308
I20141126-22:30:07.532(-8)? at Function._.each._.forEach (packages/underscore/underscore.js:113)
I20141126-22:30:07.532(-8)? at checkSubtree (packages/check/match.js:307)
I20141126-22:30:07.532(-8)? at check (packages/check/match.js:32)
I20141126-22:30:07.533(-8)? at Package (packages/accounts-oauth/oauth_server.js:7)
I20141126-22:30:07.533(-8)? at packages/accounts-base/accounts_server.js:383
I20141126-22:30:07.533(-8)? at tryLoginMethod (packages/accounts-base/accounts_server.js:186)
I20141126-22:30:07.534(-8)? at runLoginHandlers (packages/accounts-base/accounts_server.js:380)
When you receive a 'changed' event, get an error stating,
Uncaught TypeError: Cannot read property 'id' of undefined
at MeteorDdp._changeDoc (meteor-ddp.js:114)
at WebSocket.self.sock.onmessage (meteor-ddp.js:55)
MeteorDdp._changeDoc @ meteor-ddp.js:114
self.sock.onmessage @ meteor-ddp.js:55
This error comes on subscription.
Could you please specify under which license this project is published?
Would like to integrate the code into another project but need to be clear on the license.
Thank you in advance!
As the title says,
specifically jQuery dependency.
Otherwise it doesn't work with frameworks like Nativescript which support NPM modules but only if they are without DOM dependencies
var addCheck = ddp.call('addCheckRoom', [url]);
addCheck.done(function(){
callback();
});
This is what I'm trying to do. The method 'addCheckRoom' works as expected but the callback is not firing.
First of all, awesome script! I've made a version that replaces jquery Deferred dependency. If you're interested I can fork the repro.
But, how to deal with following use case:
What if the client can only connect to the server if it passes a specific token in the connect() call. How could I make that setup? Any suggestions?
Could we remove them, or making them configurable? Also, great package.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.