-
Notifications
You must be signed in to change notification settings - Fork 0
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
DEVEXP-563: Add SMS 'Getting Started' code #4
Conversation
@@ -0,0 +1,5 @@ | |||
export const validateSignature = (req, res, next) => { | |||
console.log('Validating SMS event signature.'); | |||
// Do nothing as this feature is not supported yet. |
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.
If it's not supported yet, maybe it's better to skip it?
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.
Or rather not.
The Node.js SDK doesn't support the validation of the signature headers but the customer that will use this guide may have the feature activated on their account. If they want to perform the validation, the architecture is ready to do so.
Thus, I prefer to keep it this way.
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.
👍
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.
LGTM
SINCH_PROJECT_ID = <Your Sinch Project ID> | ||
SINCH_KEY_ID = <Your Sinch Key ID> | ||
SINCH_KEY_SECRET = <Your Sinch Key Secret> | ||
SMS_REGION = us |
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.
Same comment as fro server template: is us
is not yet the default value ?
keySecret: process.env.SINCH_KEY_SECRET, | ||
servicePlanId: process.env.SINCH_SERVICE_PLAN_ID, | ||
apiToken: process.env.SINCH_API_TOKEN, | ||
smsRegion: process.env.SMS_REGION || SmsRegion.UNITED_STATES, |
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.
Seems SinchCLient is already setting it as a default value: https://github.com/sinch/sinch-sdk-node/blob/main/packages/sms/src/rest/v1/sms-domain-api.ts#L83
And we are setting again the default us
value at config file level and also here
Sure: the us
will be a very default value 😄
@@ -0,0 +1,5 @@ | |||
export const validateSignature = (req, res, next) => { | |||
console.log('Validating SMS event signature.'); | |||
// Do nothing as this feature is not supported yet. |
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.
👍
No description provided.