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

Add Option to Register if Registration fails in first attempt #143

Open
guy34code opened this issue Mar 26, 2019 · 8 comments
Open

Add Option to Register if Registration fails in first attempt #143

guy34code opened this issue Mar 26, 2019 · 8 comments

Comments

@guy34code
Copy link

Summary:

When you fail to register for first time for any reasons, there is not an option to register again, you just have to clear data or reinstall apk to Register again.

Steps to reproduce:

If your registration fails and home screen appears, then there is no option to for registration again.

Device and Android version:

Model: Xiaomi MiA1
Android: 9.0(Pie)
ROM: Stock ROM

Screen-shots:

WhatsApp Image 2019-03-26 at 7 57 41 PM

Would you like to work on the issue?

Yes, I would like to work on this issue.

@amitYadavDev
Copy link

@guy34code can i work on this issue?

@jrandallclark
Copy link
Contributor

@guy34code can i work on this issue?

You're welcome to work on this issue.
You just need to make sure you understand the steps that are taken at registration, check if they've all been completed correctly, and notify the user/return them to the registration screen if it fails.

Registering creates a public/private key pair in the NDN keychain for that user's username/identity. This needs to be one of the things that is checked. In case there's some other problem, but the keys are created successfully, they should be deleted in case the user decides to enter a different username or namespace.

@amitYadavDev
Copy link

@jrandallclark now i m working on this issue.

@amitYadavDev
Copy link

@jrandallclark there is no option for signup? and replaced register with login. what is database to signup and signin?

@amitYadavDev
Copy link

SQLite?

@agawande
Copy link
Collaborator

Sqlite is used by NDN Keychain (via jNDN) to store the keys. But you should not have to interact with Sqlite directly iirc. When the app is started for the first time (i.e. no data from previous run), the page it presents is the registration page. There is no sign out once you register (since there is no remote server, everything is in this app) so sign-in does not make sense.

@amitYadavDev
Copy link

Sqlite is used by NDN Keychain (via jNDN) to store the keys. But you should not have to interact with Sqlite directly iirc. When the app is started for the first time (i.e. no data from previous run), the page it presents is the registration page. There is no sign out once you register (since there is no remote server, everything is in this app) so sign-in does not make sense.

sir @agawande what are the essential keys to register into app?
it is taking only username and password(there is no restriction in pass or username they can be a letter also, you can see below attachment.
Screenshot_20200114-130402

amitYadavDev pushed a commit to amitYadavDev/ndn-photo-app that referenced this issue Jan 14, 2020
@jrandallclark
Copy link
Contributor

jrandallclark commented Jan 14, 2020

This is an NDN app. So the domain is a routeable NDN namespace. Currently, only local communication where both devices are connected to the same router is supported, so anything that doesn't include the string "npChat" will work. As your account is tied directly to your phone at the moment, the password is not currently used for anything.

The fix for this issue would be to check that the user's identity and public/private key pair are successfully created in the NDN keychain and the username is stored in shared preferences. The login boolean value is also in shared preferences. If any part of registering fails, the user should be automatically sent back to the registration/login screen.

Additionally, any partially finished work needs to be deleted in the event of a failure. You can see where the NDN keychain is being accessed in the BackgroundJobs class.

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

No branches or pull requests

4 participants