<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Stian,<div class=""><br class=""></div><div class="">My excuses. You are completely right. I overlooked the default error message completely. The reason was that for some reason in our project at some point we had decided to remove the actual error message from our error.ftl and instead display the same generic error message for all errors..</div><div class=""><br class=""></div><div class="">cheers</div><div class=""><br class=""></div><div class="">Edgar</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 11 Mar 2016, at 12:16, Stian Thorgersen &lt;<a href="mailto:sthorger@redhat.com" class="">sthorger@redhat.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div dir="ltr" class="">Unformatted error message will just return the key used to lookup the actual error message. In this case the key is&nbsp;invalidCodeMessage. You can change what text is displayed for this key by creating a custom theme, add a message bundle with a different value for that key. Messages should be changed this way, not by editing the template so there's no need to pass the "unformatted message" to the ftl.<div class=""><br class=""></div><div class="">One issue is that this specific key is used for a few different errors, including:</div><div class=""><br class=""></div><div class="">* A user clicks on the link again after it has been completed</div><div class="">* The link expires</div><div class="">* A user spends to long trying to login so the code is removed</div><div class=""><br class=""></div><div class="">Ideally we'd have different keys for different scenarios, but it's hard to identify which is the problem as the code has been removed we're not actually sure what's going on.</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On 10 March 2016 at 14:58, Edgar Vonk - <a href="http://info.nl" class="">Info.nl</a> <span dir="ltr" class="">&lt;<a href="mailto:Edgar@info.nl" target="_blank" class="">Edgar@info.nl</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word" class="">
hi,<br class="">
<br class="">
Somewhat related to&nbsp;<a href="https://issues.jboss.org/browse/KEYCLOAK-2125" target="_blank" class="">https://issues.jboss.org/browse/KEYCLOAK-2125</a>&nbsp;(User Actions email link expires too early): when a user clicks on a ‘users action’ link and the token has expired we would
 like to show a specific error message to the user informing him/her of this. E.g. "We're sorry. The (temporary) token in the link you tried to access has expired. Please contact your administrator."<br class="">
<br class="">
Right now when a token (/user session) has expired and the user clicks on the user actions link in the email he/she sees the generic Keycloak account error screen: "We're sorry. An error occurred, please login again through your application.". The user now
 has no idea what went wrong and in our case cannot even login again as the user has no password yet.&nbsp;<br class="">
<br class="">
If I am not mistaken currently this is not possible because the original error code is not passed on to the error page (error.ftl) from FreeMarkerLoginFormsProvider#createResponse because the rendered page is of type "ERROR" in which case the original (error)
 message (#getFirstMessageUnformatted()) is not added to the list of attributes for the FTL?<br class="">
<br class="">
Am I correct in this? If so does it make sense to create a feature request JIRA ticket for it?<br class="">
<br class="">
cheers<span class="HOEnZb"><font color="#888888" class=""><br class="">
<br class="">
Edgar
</font></span></div>

<br class="">_______________________________________________<br class="">
keycloak-user mailing list<br class="">
<a href="mailto:keycloak-user@lists.jboss.org" class="">keycloak-user@lists.jboss.org</a><br class="">
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank" class="">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br class=""></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>