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

Implement user authorization and verification #14

Closed
Haider8 opened this issue Sep 25, 2019 · 21 comments
Closed

Implement user authorization and verification #14

Haider8 opened this issue Sep 25, 2019 · 21 comments
Assignees
Labels
enhancement New feature or request Hacktoberfest Issues to be solved as part of Hacktoberfest help wanted Extra attention is needed

Comments

@Haider8
Copy link
Owner

Haider8 commented Sep 25, 2019

No description provided.

@Haider8 Haider8 added enhancement New feature or request Hacktoberfest Issues to be solved as part of Hacktoberfest help wanted Extra attention is needed labels Sep 25, 2019
@vitokhangnguyen
Copy link
Contributor

vitokhangnguyen commented Sep 26, 2019

Hi, I would like to work on this. I might have questions regarding the workflow later.

@Haider8
Copy link
Owner Author

Haider8 commented Sep 26, 2019

Hello. Sure @vitokhangnguyen, you can work on this, and you can definitely ask anything regarding this. Just let me know how much time will you be needing approximately.

Thank you :)

@vitokhangnguyen
Copy link
Contributor

Hi,
As I am learning Python in the process and I have done this before with JavaScript and C++, does 2 weeks from now sound reasonable to you?

@Haider8
Copy link
Owner Author

Haider8 commented Sep 28, 2019

@vitokhangnguyen Yes sure. Good luck 👍

@vitokhangnguyen
Copy link
Contributor

Hi @Haider8,
I have done some research on the tool and I have a few questions I hope you can help me answer.

  1. By "Authorization" and "Verification", what you want is for the program to prompt the user for password every time the user runs it, is that right? (Or you are talking about client certificate?)
  2. If so, we will also need a broker that is configurated to accept password and store a password file on its side (instead of using the test/default Mosquitto's broker as right now). Do you want to build that, too?

@Haider8
Copy link
Owner Author

Haider8 commented Oct 1, 2019

This approach will be fine too. You can try doing this by setting up your own broker locally. Otherwise we have one more option of using a REST API just for authorization. Whenever program is started we can check through that API if that user is valid or not.

You can start with setting up the passwords on broker's side.

@vitokhangnguyen
Copy link
Contributor

@Haider8
Thank you for your reply.

The REST API is a good idea. I think I will go this way since it gives us more total control of the authentication/authorization process. I will deliver a new repository for the API soon.

@Haider8
Copy link
Owner Author

Haider8 commented Oct 1, 2019

@vitokhangnguyen Can I create a new repository for that? And what will be the technology stack of that API?

@vitokhangnguyen
Copy link
Contributor

vitokhangnguyen commented Oct 1, 2019

@Haider8 For sure, I am planning to build the API in Python and using Flask. Does that sound good to you? I can also do it in Nodejs...

@Haider8
Copy link
Owner Author

Haider8 commented Oct 1, 2019

@vitokhangnguyen I think Node js can be good in our case. What do you think? We will be using Heroku for deployment as they are having some free plans for the Node js + mongo DB environment. Do you know any other good service which we can use?

@Haider8
Copy link
Owner Author

Haider8 commented Oct 1, 2019

Here is the repository for our API : https://github.com/Haider8/tmessage-api

@vitokhangnguyen
Copy link
Contributor

I had experience with MongoDB and Heroku before so that would be good for me 😄

@Haider8
Copy link
Owner Author

Haider8 commented Oct 1, 2019

That's great. So let's set up the project first. Do you have any tutorials or video series which we can refer to for our API?

@vitokhangnguyen
Copy link
Contributor

vitokhangnguyen commented Oct 1, 2019

Besides tutorial about setting up Nodejs and MongoDB, I do not have any specific pattern out there to follow. I think our API will first have 3 simple routes:

/api/user/checkExist
/api/user/authenticate
/api/user/register

I can get started and set up the nodejs/mongodb template for the project

And thank you for the new repo.

@Haider8
Copy link
Owner Author

Haider8 commented Oct 1, 2019

Yes, those 3 routes can get us started. We will be doing email verification?

@vitokhangnguyen
Copy link
Contributor

I would say let's not, for now, that can be an issue you can add in later for someone to solve

@Haider8
Copy link
Owner Author

Haider8 commented Oct 1, 2019

You are right. That will be a lot to do right now. We can open a new issue once this gets completed. Sounds good?

@vitokhangnguyen
Copy link
Contributor

That's perfect.

@vitokhangnguyen
Copy link
Contributor

Hi @Haider8,
I made a PR to the tmessage-api to set up the RESTApi. After you review that and are ok with that, I can work on the client-side to interact with that API.

@Haider8
Copy link
Owner Author

Haider8 commented Oct 4, 2019

@vitokhangnguyen PR is merged now. You can resume the work for client now 👍

Haider8 pushed a commit that referenced this issue Oct 6, 2019
* Add user authentication functionality by interacting with tmessage-api

* Adjust code styling to align with PEP 8 standard

* Minimize dependencies

* Adjust code to align with  hound standard

* Fix styling for "continuation line over-indented for visual indent"

* Fix auth ModuleNotFound of "import auth"

* Fix auth ModuleNotFound of "import auth"
@Haider8
Copy link
Owner Author

Haider8 commented Oct 6, 2019

Fixed by #29

@Haider8 Haider8 closed this as completed Oct 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Hacktoberfest Issues to be solved as part of Hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants