eyra / mono

Next platform repo
https://eyra.co
GNU Affero General Public License v3.0
7 stars 5 forks source link

Unable to logon as researcher after participating as participant #963

Closed TjerkNan closed 1 month ago

TjerkNan commented 1 month ago

Describe the bug After you particpate in a data donation flow, you are unable to access the Sign in button on the top right. When you access the actual url /user/sigin 'nothing happens'.

Closing the browser application or using a private window circumvents this issue.

To Reproduce Steps to reproduce the behavior:

  1. Participate in data donation flow
  2. Observe that Signin button is gone
  3. Observe that /usr/signin isn't working.

Expected behavior Sign in always works.

Screenshots Screenshot 2024-09-16 at 11 57 45

Smartphone (please complete the following information): All Browsers

mellelieuwes commented 1 month ago

@TjerkNan The participant is an anonymous user that is technically signed in. This is by design.

You can log out the participant by going to /user/profile.

Does this help?

TjerkNan commented 1 month ago

@mellelieuwes yes that workaround works indeed. So should the solution be that we instruct/document this behaviour?

mellelieuwes commented 1 month ago

@TjerkNan profile/logout is a hidden participant feature to not distract the participant. The participant does not need to logout.

So it is only needed when a creator tests the (anonymous) participant flow and want to go back to the creator account on the same browser.

Sometimes clients have this issue when testing the flow.

Do you have a suggestion where to document it? Or change the UX so it can be prevented?

mellelieuwes commented 1 month ago

@TjerkNan I have fixed this issue by remove the user from the session when:

This means If you now click on the top left Next logo (opens home page) or manually go to for example /project or/user/signin the anonymous participant is signed out out first.

TjerkNan commented 1 month ago

After donating as anonymous, the sign-in page is visible again after clicking on next logo. As a participant being logged in it works too, but I will be logged out, seems OK to me.