-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Amazon SNS support #711
Amazon SNS support #711
Conversation
for the payload, you could create a static function in GCM.js so you won't need instantiation. |
@rogerhu updated the pull request. |
@rogerhu updated the pull request. |
@rogerhu updated the pull request. |
@rogerhu updated the pull request. |
@rogerhu updated the pull request. |
@rogerhu updated the pull request. |
@rogerhu updated the pull request. |
@rogerhu updated the pull request. |
var self = this; | ||
|
||
// Exchange the device token for the Amazon resource ID | ||
for (let device of devices) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use
let promises = devices.map((device) => {
return this.exchangeTokenPromise(device, pushType);
});
Current coverage is
|
Is this ready to go? I don't see a SNS Access key/secret in AWS control panel and it only limits you to two of these types of keys. What about using process.env.AWS_ACCESS_KEY and process.env.AWS_ACCESS_SECRET just like S3 Adapter? Is all of this supposed to be included? or just the name portion?
@rogerhu Would you mind updating the Wiki with examples/docs on how to set this up in AWS? |
@rogerhu updated the pull request. |
You have to grant Identity Access Management (IAM) permissions to a user/role. You then generate an AWS key from there. |
Can't do this:
|
Is there somewhere that says you can? require('parse-server/lib/Adapters/Push/SNSPushAdapter') assuming this branch is pulled in. |
I'm trying to test and starting to realize it's harder than I thought. What's your package.js look like? I've got a folder called On Mon, Mar 14, 2016 at 4:23 PM, Roger Hu [email protected] wrote:
|
You can go to your parse-server-example and do:
Or edit dependencies for parse-server-example in package.json to reference the parse server locally:
To force reinstall, npm install parse-server |
Is the .babelrc needed in your parse-server? How do I install these prereq's? |
@flovilmart What's the ETA on merging this? Thanks! |
@rogerhu can you fix branch conflicts? I'm hoping to start using SNS ASAP. Thanks for your work! |
05989a6
to
c25001a
Compare
@rogerhu updated the pull request. |
1 similar comment
@rogerhu updated the pull request. |
Finally got to pass again =) |
This is very cool.. but like #971, I'd really like to see this as a separate module instead of part of the core server. 971 became https://www.npmjs.com/package/parse-server-sendgrid-adapter, and this could be parse-server-sns-adapter. |
I have changes to APNS and GCM that would need to be added...you guys OK if I break out as a separate PR and then fork the rest into a separate adapter module? |
Yeah, break out the changes you'd like to make in a PR. I was going to counter that they don't need to be made, but, it does es6-ify things which I think we want, so go for it. I'll close this one, you can submit a PR and make your separate module for SNS. Thanks. 👍 |
To be clear some of the changes need to be made to leverage the APNS/GCM payload creation. https://github.com/ParsePlatform/parse-server/pull/1158/files |
Final plugin has been moved here and successfully tested. Updated docs too: https://github.com/parse-server-modules/parse-server-sns-adapter |
TODOS:
a. Adding Platform endpoints to AWS console
b. Add IAM roles for platform
c. CloudSearch logs debugging
The worst part of adding was figuring out AWS SNS JSON encoding:
http://bit.ly/215rLnq