I’m a bit unclear on this. Is it possible to determine the origin of a login request so the logo on the Guardian hosted page can be customised based on the subdomain?
Discussed it with a few of co-workers and it seems like there is no way to adjust the logo based on the subdomain. I highly encourage you to report it as feedback to our product team as a feature request as it would be really helpful in some cases.
I am not sure if this is still a requirement, but I was looking for something else and I came across your question. it is not exactly what you ask, but I have devised a way in which to identify which client (application) the request came from and add a custom logo in in.
This is achieved by opening the editor for the Multi-factor Authentication (Universal Login section \ Multi-factor Authentication tab) and add the following between <script> and (function() {...}:
function getClientId() {
var regex = new RegExp(‘[?&]state(=([^&#]*)|&|#|$)’),
results = regex.exec(window.location.href);
if (!results) return null;
if (!results[2]) return ‘’;
var decodedState = window.atob(results[2]).split(/[\s,]+/);
if (!decodedState[3]) return ‘’;
return decodedState[3];
}
You will now be able to specify branding based on the clientId.