🐛 [[email protected]] SMTP connection URI with Sendgrid #2322
Labels
needs: author feedback
Pending additional information from the author
type: bug
Something isn't working
Describe the problem:
When running the extension with my sendgrid credentials, i received the following log: API key does not start with "SG.". with a following error that my message couldn't be send.
I added a log of the config, and the password was omitted.
In the log.ts/js files in the source code, the config looks like this:
export const obfuscatedConfig = Object.assign({}, config,
{
smtpConnectionUri: "",
smtpPassword: "",
clientId: "",
clientSecret: "",
refreshToken: "",
}
);
When analyzing the code i noticed that in the index.ts/js the function sendWithSendGrid(payload: QueuePayload) uses sgMail.setApiKey(config.smtpPassword), but from the firebase console i can't configure the password (doesn't generate the create secret from the console)
To temporarily solve the problem, i created my own secret key as SMTP_PASSWORD as the variable in the config is set and commented the atrs. that were hard coded "" but it would be nice for this bug to be fix so that i don't have problems in future extension updates.
Hope my description helps.
Summary:
{
smtpConnectionUri: "",
smtpPassword: "",
clientId: "",
clientSecret: "",
refreshToken: "",
}
or change the position in the assign with the config so it doesn't overwrite the config variables that contain the data needed. Ex:
Object.assign({
smtpConnectionUri: "",
smtpPassword: "",
clientId: "",
clientSecret: "",
refreshToken: "",
}, config);
The text was updated successfully, but these errors were encountered: