Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Login through username in the new app #181

Merged

Conversation

farhan-arshad-dev
Copy link
Contributor

Description

  • Add username support for the authentication.
  • User can log in using email.
Before After
Screenshot_20240110_191406 Screenshot_20240110_190659

- Add username support for the authentication

fixes: LEARNER-9782
Copy link
Contributor

@omerhabib26 omerhabib26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only some minor nits

Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE)
val matcher = validEmailAddressRegex.matcher(email)
return matcher.find()
fun isEmailOrUserNameValid(email: String): Boolean {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are still only verifying the email address, do we need to verify the username?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we only need to check that user name shouldn't be empty. iOS did the same.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be great if you could just check space in the field.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already replaced with isBlank, so no need to check white spaces. Also can trim the white space in case of non-blank. thoughts?

Copy link
Contributor

@k1rill k1rill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only nits

@farhan-arshad-dev farhan-arshad-dev linked an issue Jan 18, 2024 that may be closed by this pull request
k1rill
k1rill previously approved these changes Jan 18, 2024
omerhabib26
omerhabib26 previously approved these changes Jan 19, 2024
Copy link
Contributor

@omerhabib26 omerhabib26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor nit

@farhan-arshad-dev farhan-arshad-dev dismissed stale reviews from omerhabib26 and k1rill via 0b709c4 January 19, 2024 11:36
Copy link
Contributor

@omerhabib26 omerhabib26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@farhan-arshad-dev farhan-arshad-dev merged commit afcda48 into openedx:develop Jan 19, 2024
2 checks passed
@farhan-arshad-dev farhan-arshad-dev deleted the farhan_ar/LEARNER-9782 branch January 19, 2024 14:36
omerhabib26 pushed a commit to omerhabib26/openedx-app-android that referenced this pull request Jan 22, 2024
- Add username support for the authentication

fixes: LEARNER-9782
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android - Unable to sign-in through username
3 participants