Stream: ui-dev

Topic: Login process with Academic Account


view this post on Zulip Pablo Picurelli Ortiz (Sep 23 2025 at 08:18):

Hi, I have created a feature issue in GitHub, as I was having trouble when logging in with the student account from my university URJC, https://github.com/IQSS/dataverse-frontend/issues/837

view this post on Zulip Philip Durbin πŸš€ (Sep 23 2025 at 09:41):

Interesting. As a workaround you could pick a different username, right?

view this post on Zulip Pablo Picurelli Ortiz (Sep 23 2025 at 10:19):

Philip Durbin πŸš€ ha dicho:

Interesting. As a workaround you could pick a different username, right?

I received a blue notification box which said values provided by IdP (in my case my uni) could not be modifed at such part of registration, so still have not got access to dashboard and be able to change it

view this post on Zulip Pablo Picurelli Ortiz (Sep 23 2025 at 10:21):

Pablo Picurelli Ortiz ha dicho:

Philip Durbin πŸš€ ha dicho:

Interesting. As a workaround you could pick a different username, right?

I received a blue notification box which said values provided by IdP (in my case my uni) could not be modifed at such part of registration, so still have not got access to dashboard and be able to change it

image.png

view this post on Zulip Pablo Picurelli Ortiz (Sep 23 2025 at 10:24):

Philip Durbin πŸš€ ha dicho:

Interesting. As a workaround you could pick a different username, right?

Maybe at that part of registration, allowing to change only username could be a good idea.

view this post on Zulip Philip Durbin πŸš€ (Sep 23 2025 at 11:24):

Interesting. I didn't realize it works this way. Thanks for opening that issue! And thanks for adding those extra screenshots to it!

view this post on Zulip Pablo Picurelli Ortiz (Sep 23 2025 at 11:25):

Philip Durbin πŸš€ said:

Interesting. I didn't realize it works this way. Thanks for opening that issue! And thanks for adding those extra screenshots to it!

You are welcome!

view this post on Zulip Philip Durbin πŸš€ (Sep 23 2025 at 13:32):

@Guillermo Portas to work on this bug, one should use dev-env/shib-dev-env, right? From https://github.com/IQSS/dataverse-frontend/pull/688

view this post on Zulip Pablo Picurelli Ortiz (Sep 23 2025 at 15:24):

I have created a PR if it not passes tests I will remove such PR, but I have used the option which allow you devs to modify it in case some enhancement are considered

view this post on Zulip Philip Durbin πŸš€ (Sep 23 2025 at 15:29):

This PR: https://github.com/IQSS/dataverse-frontend/pull/838

Thanks!

view this post on Zulip Philip Durbin πŸš€ (Sep 23 2025 at 15:30):

@Pablo Picurelli Ortiz can you please change

- Closes #
https://github.com/IQSS/dataverse-frontend/issues/837

to

- Closes #837

view this post on Zulip Pablo Picurelli Ortiz (Sep 23 2025 at 15:30):

Philip Durbin πŸš€ said:

Pablo Picurelli Ortiz can you please change

- Closes #
https://github.com/IQSS/dataverse-frontend/issues/837

to

- Closes #837

Going to do that

view this post on Zulip Pablo Picurelli Ortiz (Sep 23 2025 at 15:59):

Btw I haven't collaborated so much in GitHub until this summer, so it's my first pull request :fingers_crossed:

view this post on Zulip Philip Durbin πŸš€ (Sep 23 2025 at 16:01):

No worries, we're friendly :smile:

view this post on Zulip Philip Durbin πŸš€ (Sep 25 2025 at 18:49):

@Pablo Picurelli Ortiz we had a long chat about your PR this morning: https://github.com/IQSS/dataverse-frontend/pull/838 :smile:

view this post on Zulip Pablo Picurelli Ortiz (Sep 25 2025 at 18:53):

Philip Durbin πŸš€ said:

Pablo Picurelli Ortiz we had a long chat about your PR this morning: https://github.com/IQSS/dataverse-frontend/pull/838 :smile:

Is it going to be reviewed and merged?

view this post on Zulip Philip Durbin πŸš€ (Sep 25 2025 at 18:55):

Well, reviewed, at least.

view this post on Zulip Philip Durbin πŸš€ (Sep 25 2025 at 18:56):

Have you tried reproducing the bug in the development environment?

view this post on Zulip Pablo Picurelli Ortiz (Sep 25 2025 at 18:57):

Philip Durbin πŸš€ said:

Have you tried reproducing the bug in the development environment?

Do you mean dev domain beta.dataverse.org?

view this post on Zulip Pablo Picurelli Ortiz (Sep 25 2025 at 18:58):

Pablo Picurelli Ortiz said:

Philip Durbin πŸš€ said:

Have you tried reproducing the bug in the development environment?

Do you mean dev domain beta.dataverse.org?

It happened there

view this post on Zulip Philip Durbin πŸš€ (Sep 25 2025 at 18:58):

No, I mean by running project locally: https://github.com/IQSS/dataverse-frontend/blob/develop/DEVELOPER_GUIDE.md#running-the-project-locally

view this post on Zulip Pablo Picurelli Ortiz (Sep 25 2025 at 19:02):

Philip Durbin πŸš€ said:

No, I mean by running project locally: https://github.com/IQSS/dataverse-frontend/blob/develop/DEVELOPER_GUIDE.md#running-the-project-locally

No but I can try tomorrow, pull request code can be tried also, I am about to go to rest

view this post on Zulip Philip Durbin πŸš€ (Sep 25 2025 at 19:04):

Great, thanks. I think you're going to want to add a user with an email address for a username in one of these files (I'm not sure which one):

dev-env/keycloak/test-realm.json
dev-env/shib-dev-env/keycloak/test-realm.json

view this post on Zulip Pablo Picurelli Ortiz (Sep 25 2025 at 19:07):

Philip Durbin πŸš€ said:

Great, thanks. I think you're going to want to add a user with an email address for a username in one of these files (I'm not sure which one):

dev-env/keycloak/test-realm.json
dev-env/shib-dev-env/keycloak/test-realm.json

Apart from modifying one of those files, can the process also be done manually? I mean loging in with my URJC uni account and verify before and after pull request code if manage to log in

view this post on Zulip Philip Durbin πŸš€ (Sep 25 2025 at 19:10):

It will be a stronger pull request if you provide a test case and instructions under how to test. I don't think you want to give us your URJC password. :smile:

view this post on Zulip Pablo Picurelli Ortiz (Sep 25 2025 at 19:13):

Philip Durbin πŸš€ said:

It will be a stronger pull request if you provide a test case and instructions under how to test. I don't think you want to give us your URJC password. :smile:

Didn't realize, so maybe any other simulated identity provider in my instance?

view this post on Zulip Pablo Picurelli Ortiz (Sep 26 2025 at 06:41):

I'm now traveling to URJC and don't have classes until 2 and half hours aprox I ll start the process and then modifying pull request so it adjusts to template

view this post on Zulip Philip Durbin πŸš€ (Sep 26 2025 at 09:48):

@Pablo Picurelli Ortiz no worries, please take your time.

Also, I believe @Guillermo Portas also plans to give you feedback on your pull request.

view this post on Zulip Pablo Picurelli Ortiz (Sep 28 2025 at 17:23):

Philip Durbin πŸš€ ha dicho:

Pablo Picurelli Ortiz no worries, please take your time.

Also, I believe Guillermo Portas also plans to give you feedback on your pull request.

I have just reproduced it locally and completed the pull request

view this post on Zulip Philip Durbin πŸš€ (Sep 28 2025 at 23:22):

@Pablo Picurelli Ortiz "how to test" looks great! Thanks!

view this post on Zulip Pablo Picurelli Ortiz (Oct 07 2025 at 08:56):

@Philip Durbin πŸš€ I have modified Login.spec.tsx and test-realm.json to include a user which has an email as username, i completed registraron with the cypress test and then logged in manually and did not recieve error at least in my localhost

view this post on Zulip Pablo Picurelli Ortiz (Oct 07 2025 at 12:55):

@GermΓ‘n Saracca did you test It on dev-env im not sure why such error appeared but i have not received such error, and registered with cypress and then logged in in keycloak and seemed to work properly, furthermore to avoid logic business flaws like validation logic disparity I recommend validation both in frontend and backend so those are synchronized

view this post on Zulip GermΓ‘n Saracca (Oct 07 2025 at 13:26):

I totally agree, we also perform many validations both on the frontend and backend to stay in sync and avoid discrepancies like the one you mentioned.
However, in this particular case, even though the fix itself is simple, it wouldn’t work properly with the current logic of the /register endpoint since this will fail if we send a different username.
In my opinion, it would make more sense for the backend to handle the username modification so it remains consistent with Dataverse’s rules and we keep that strong security in the registration endpoint, anyways open to ideas πŸ‘πŸΌ

What we could do, I think, is changing the frontend username rules validations to allow "@" in the username?

  const userNameRules = {
    required: isUsernameRequired ? t('fields.username.required') : false, // <= <= We only require the username if not present in token data
    validate: (value: string) => {
      if (!Validator.isValidUsername(value)) { // <= <= <= THIS PART IS SHOWING THE ERROR
        return t('fields.username.invalid.username')
      }
      return true
    },
    maxLength: {
      value: 255,
      message: t('fields.username.invalid.maxLength', {
        maxLength: 255
      })
    }
  }

view this post on Zulip GermΓ‘n Saracca (Oct 07 2025 at 13:31):

Yes, using the dockerized dev environment. Could it be that your test pass because you just modify the form value username to remove the "@" and that avoids the form to show an error, but that username wasn't sent to the API since the username was present in the token data (frontend logic).

view this post on Zulip Pablo Picurelli Ortiz (Oct 07 2025 at 13:39):

GermΓ‘n Saracca said:

Yes, using the dockerized dev environment. Could it be that your test pass because you just modify the form value username to remove the "@" and that avoids the form to show an error, but that username wasn't sent to the API since the username was present in the token data (frontend logic).

What i still don't understand if the test had skipped such part, the registraron process should not have been finished and i should not be able to login manually and see that 498198778-ba20a384-03a0-44e7-b8c3-51fb416bc138.png

view this post on Zulip Pablo Picurelli Ortiz (Oct 07 2025 at 13:40):

When i logged in second time It redirected me directly to Dashboard, not to complete details


Last updated: Jan 09 2026 at 14:18 UTC