I’m trying to dynamically set the redirect-to link depending on the environment being used. I built a case statement:
{% case connection.name %}
{% when 'yahoo' %}
http://www.yahoo.com
{% when 'firefox' %}
http://www.mozilla.org/firefox
{% else %}
http://www.google.com
{% endcase %}
…but it can’t seem to read the connection.name; it will always redirect to google.com in the above scenario. Hard-coding it to ‘yahoo’ will also dump the user into google.
As far as I’m aware connection.name
is not available at the Redirect To field; only application-level fields like callback_domain
and clientID
. If you check the documentation you’ll also see that connection.name
is show in association with the Subject field.
You mention that you’re trying to do the redirect based on the environment; if this is a case of separating development/test users from production users by using different connections then have in mind that our recommendation would be to have separate accounts for development and QA environments.