Response from remote IdP not picked up in all cases
This will happen if both are true:
lastAuthnUsed was not yet set for the remote IdP or was set to other authenticator option than the one for which we just got an answer OR lastAuthnUsed is set but refers to IdP which is in a grid widget
Vaadin authN UI is re-initialized. It is hard to say when it happens but in some rare cases it does.
There are two sources of the problem:
wrong searching for option with id in grid
we should not relay in on the lastAuthnUsed and instead use an attribute stored in a session, only for that purpose with remote authN option id. This attribute shall be stored when authentication is started.