No sign in context after authentication

Description

Steps to reproduce (tested on FF):

  1. Run Unity on empty DB from IDE.

  2. Authenticate over OAuth to Home. Give credentials. Accept consent. After opening of the Home UI, logout from it.

  3. Authenticate over OAuth to Home again. There will be no authN question. Stay on consent screen.

  4. 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.

  5. 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:

 

Environment

None

Attachments

1
  • 14 Jun 2024, 08:37 AM

relates to

Activity

Show:

Krzysztof July 2, 2024 at 7:39 PM

QA: +1

Piotr Piernik June 12, 2024 at 5:03 PM

I still can't reproduce it

Krzysztof June 11, 2024 at 8:10 PM

I’ve updated instructions, hopefully now it is reproducible. Tried this many times, always triggered an error on my side.

Piotr Piernik June 6, 2024 at 4:04 PM

I can not reproduce it

Done

Details

Assignee

Reporter

Fix versions

Priority

Created May 28, 2024 at 10:14 AM
Updated July 15, 2024 at 4:09 PM
Resolved July 15, 2024 at 4:09 PM

Flag notifications