Authenticate over OAuth to Home. Give credentials. Accept consent. After opening of the Home UI, logout from it.
Authenticate over OAuth to Home again. There will be no authN question. Stay on consent screen.
Open another browser tab. In it: Authenticate over OAuth to Home again. There will be no authN question. Accept consent. You will land in Home UI.
Return to the fist tab. Click Accept in consent. Button changes to ERROR.
2024-05-28T12:11:19,910 [qtp1746790527-95] [UNITY OAuth2 Authorization Server] [Default Administrator] [1] [127.0.0.1] ERROR unity.server.web.CustomErrorPageInitializer: Vaadin initialization error:
io.imunity.vaadin.endpoint.common.consent_utils.LoginInProgressService$NoSignInContextException: No sign in context after authentication
at io.imunity.vaadin.endpoint.common.consent_utils.LoginInProgressService.lambda$noSignInContextException$0(LoginInProgressService.java:137) ~[classes/:?]
at java.base/java.util.Optional.orElseThrow(Optional.java:403) ~[?:?]
at io.imunity.vaadin.endpoint.common.consent_utils.LoginInProgressService.getVaadinContext(LoginInProgressService.java:87) ~[classes/:?]
at pl.edu.icm.unity.oauth.as.webauthz.OAuthSessionService.getVaadinContext(OAuthSessionService.java:56) ~[classes/:?]
at pl.edu.icm.unity.oauth.as.webauthz.OAuthConsentScreen.storePreferences(OAuthConsentScreen.java:263) ~[classes/:?]
at pl.edu.icm.unity.oauth.as.webauthz.OAuthConsentScreen.confirm(OAuthConsentScreen.java:281) ~[classes/:?]
at pl.edu.icm.unity.oauth.as.webauthz.OAuthConsentScreen.lambda$createButtonsPart$0(OAuthConsentScreen.java:190) ~[classes/:?]
at io.imunity.vaadin.endpoint.common.consent_utils.IdPButtonsBar.lambda$initUI$9b1b5227$1(IdPButtonsBar.java:53) ~[classes/:?]
Steps to reproduce (tested on FF):
Run Unity on empty DB from IDE.
Authenticate over OAuth to Home. Give credentials. Accept consent. After opening of the Home UI, logout from it.
Authenticate over OAuth to Home again. There will be no authN question. Stay on consent screen.
Open another browser tab. In it: Authenticate over OAuth to Home again. There will be no authN question. Accept consent. You will land in Home UI.
Return to the fist tab. Click Accept in consent. Button changes to ERROR.
2024-05-28T12:11:19,910 [qtp1746790527-95] [UNITY OAuth2 Authorization Server] [Default Administrator] [1] [127.0.0.1] ERROR unity.server.web.CustomErrorPageInitializer: Vaadin initialization error: io.imunity.vaadin.endpoint.common.consent_utils.LoginInProgressService$NoSignInContextException: No sign in context after authentication at io.imunity.vaadin.endpoint.common.consent_utils.LoginInProgressService.lambda$noSignInContextException$0(LoginInProgressService.java:137) ~[classes/:?] at java.base/java.util.Optional.orElseThrow(Optional.java:403) ~[?:?] at io.imunity.vaadin.endpoint.common.consent_utils.LoginInProgressService.getVaadinContext(LoginInProgressService.java:87) ~[classes/:?] at pl.edu.icm.unity.oauth.as.webauthz.OAuthSessionService.getVaadinContext(OAuthSessionService.java:56) ~[classes/:?] at pl.edu.icm.unity.oauth.as.webauthz.OAuthConsentScreen.storePreferences(OAuthConsentScreen.java:263) ~[classes/:?] at pl.edu.icm.unity.oauth.as.webauthz.OAuthConsentScreen.confirm(OAuthConsentScreen.java:281) ~[classes/:?] at pl.edu.icm.unity.oauth.as.webauthz.OAuthConsentScreen.lambda$createButtonsPart$0(OAuthConsentScreen.java:190) ~[classes/:?] at io.imunity.vaadin.endpoint.common.consent_utils.IdPButtonsBar.lambda$initUI$9b1b5227$1(IdPButtonsBar.java:53) ~[classes/:?]
Another reproduction steps: