Keycloak is sending HTML code inside password reset link - keycloak

Yesterday I started noticing that the keycloak emails for required user actions are containing HTML characters inside the URL that is being sent for the required action.
example: /auth/realms/EasyDox/login-actions/action-token?key=eyJhbGciOiJIUzI1NiI
This of course gives me an error on the keycloak page
If I change the characters &#61 to = in the URL, it works fine and I am able to do the password reset.
Note that we are using mailjet to send emails through our custom domain.
I really don't know where the issue is since before yesterday everything was working fine, and I'm kind of lost on what to look for.
If anyone has any suggestions what to try since we have customers that are connected to this keycloak, and some of them can't log in since they forgot their password.

I managed to solve this by moving our mail sending from Mailjet to SendGrid. It had nothing to do with keycloak.

Related

How to send email in reactjs

So I'm trying to create a forgot password feature and I want to send email to user for verification. The problem is how should I do that? I've tried frontend services like emailJS but that didn't work because you pre-define where the emails are sent. I need it to be sent to the user, not me.
I've also tried backend services like nodemailer but with nodemailer I have to generate a code on the backend, send it to the frontend and on the email. The problem with this is that if someone gets access to anothers email he can click forgot password and get access to the code by looking at request sent to the backend in the chrome's dev tools
So now I'm stuck trying to figure this out. Can anyone help me?

Gmail loses the html formatting of emails sent with Odoo

My company migrated their CRM starting to use Odoo, and then I proceeded to configure the external mail server (gmail), the #catchall parameter, and then define the odoo mail templates.
So far I have no problems, and everything works as I expect, so the mails are correctly and received.
However, I have a problem with viewing the emails ... let me explain.
Sent an email through Odoo, I see it correctly in html format, so by accessing the gmail email account via browser and opening the message, also in this case it is correctly formatted and displayed as html.
However, the recipient of the e-mail upon receipt loses the html formatting and therefore receives the e-mail displaying it in plain-text.
On the gmail settings I have already configured to send messages in html, I tried to disable it and then re-enable it but nothing happens.
Do you have any suggestions or advice?
I also have the same problem. We have tried several configurations both in the Google account and in the server. It only happens with GMail mail. Using any other service does not happen.
There's an answer here that I still can't implement, but it could be of help.
GMail displays plain text email instead HTML
A known reason for the issue was the appending of a footer in Google. Odoo has recently released a fix for all versions from 14.0 onwards: https://github.com/odoo/odoo/pull/108499. However, if they encounter other cases, Odoo Enterprise customers can open a support ticket and users of the Community edition can submit a Github issue.

Auth0 - Sendgrid not sending Email but working on test email

I have just begun working with an account that had been set up by someone else using Auth0 and Sendgrid to handle email verification.
Ever since the 11th of December, the whole thing just stopped sending emails out of the blue. We thought it had to do with payment plan but even after the upgrade it didn't change anything.
But here's the weird part: When we send a test email the whole thing works perfectly, but when we try to re-send authentication email it doesn't.
Does anyone have any clue as to what might be going on? We've checked settings and price plan and neither are any different to other accounts with the same set-up, yet it hasn't been working since the 11th.
I work with the Auth0 Community team. Are you seeing anything in the logs about emails failing to send? Are verification emails turned on for your tenant? We also have a step by step setup doc for setting up Send Grid which you could use for confirming your current setup which I've shared below. I hope this helps you in the path forward.
https://auth0.com/docs/email/providers#configure-sendgrid

Gmail SMTP Access 5.5.1 Authentication Required. From Custom Domain

I'm trying to send emails via smtp.gmail.com in the standard way, and I'm getting a standard error, but for some non-standard reason.
Specifically, I get this error: System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. when I send the mail.
The answers on this link have not helped me: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required?
I suspect that there are additional steps required if you're trying to do this from a custom domain.
I've created a throw-away standard Gmail account to test out my code and everything works perfectly there.
If I en-/dis-able Less Secure Apps then it behaves as you'd expect, and as per the linked solutions.
If I en-/dis-able 2FA and create 3rd party app passwords then, again, it behaves as I'd expect, and as per the linked solutions.
So my code, and my ability to configure a general Gamil acccount, are working just fine.
But when I use an otherwise identical GSuite email address, set up on a custom domain (system#clientdomain.co.uk) then nothing works :( I've tried all the permutations, with/without LessSecureApps, with main user password / with 3rd Party App Password, etc. Nothing works.
I can only assume that either the custom domain or the fact that it's a GSuite account is breaking it.
What now?
So apparently I either needed to wait longer, or change the settings harder!!
A colleague wandered past and asked what the problem was and I demonstrated it, including going through and setting the settings again, and this time it worked. I'm 80% sure they were the same settings, but perhaps not?

when sending a verify email request from keycloak via sendgrid, the resulting url is wrongly encoded

I have a keycloak (4.4.0-Final) installation.
Scenario:
sendgrid is configured as mail agent (and test mail sending is ok)
I create a new user in keycloak admin console and I pass it the action "verify email"
I get an email with a link to verify my email address, but when I click the link, I get the error "We're sorry...
An error occurred, please login again through your application."
I now have a closer look at the URL and I see 2 times = => http://keycloakurl/.....login-actions/action-token?key=eyJhbGciOiJIUzUx...&client_id=client-...
When I change = to = , the url works.
Does someone know if this is a bug in sendgrid, or a bug in the keycloak templates?
I know you have moved ahead with Mailjet but I would like to share my solution here as it may help others. I noticed this issue only happens if Email Tracking is enabled at SendGrid side. Try after disabling all tracking configurations under Setting -> Tracking screen.
The issue was not keycloak, but sendgrid (ref: https://issues.jboss.org/browse/KEYCLOAK-8536). We fixed the issue by dropping sendgrid and going to mailjet.