As part of IdP initiated SSO, when performing an automatic redirect for unauthenticated users, the current URL should be included as a relaystate parameter. This way, deep links would work properly with IdP initiated SSO.