Closed vygandas closed 9 months ago
So you need a backend developer to solve this issue ?
So you need a backend developer to solve this issue ?
@ahmed-e-elhor, technically it's a full stack. π€·ββοΈ
Sir, Do you want to add authentication and authorization feature via Google, Github, or Facebook signIn/up, Please correct me If I am wrong Basically you want to add Role Base Authentication 1) user signup, user attached to some default organization with details as null initially 1.1) user can add other organization 2) user signIn to different Organization for which they belongs to. 3) Forget Password via email verification.
and rest features you mentioned above
Sir, Do you want to add authentication and authorization feature via Google, Github, or Facebook signIn/up, Please correct me If I am wrong Basically you want to add Role Base Authentication
- user signup, user attached to some default organization with details as null initially 1.1) user can add other organization
- user signIn to different Organization for which they belongs to.
- Forget Password via email verification.
and rest features you mentioned above
No. Please read again carefully. All the details are in there. I've also provided a lot of details for context so it would be easier to understand the large picture of the task and the overall goal we want to reach.
oAuth implementation will be the next step, which is not in the scope of this issue. Need to implement base authentication completely first.
In this case, even tho there's quite a lot of writing done for the organization, it should be relatively easy to implement that - just create an organization for a new user, tie it together on the relations table with the default role name and that's it. Fast one π Oh also, there's no UI for organizations, it's just making a record.
Regarding roles - it's also out of the scope of this issue. It will be needed, but not at this time.
AC scope too much, I think should be separate to 3 task sign-in sign-up forgot password
@suneox well, it's merged into one, because sign up works, sign in also works, forgot password - sends email with code, sets in db. Practically it's more work on tokens, refresh, making sure it's all nice. It also has tests coverage, quite extensive.
If You can provide more context on the e2e tests, and an example of the front end work required for this task I am ready to join
@ahmed-e-elhor , please ask more specifically what you're interested in. e2e is e2e :) Open to suggestions and ideas, too. So far, current e2e is what NX generated by default, so nobody really messed with those at all.
Regarding frontend - can just follow the same "design" as it was done. I mean, there's no design at all, 0 lines of CSS :) The whole point is to get it working and have a good/smart/proper components structure.
Dropping e2e from this task. A bit of an overkill π€
@PhamAnhHoang, yeah, it makes sense. Of course, you would need to handle when 401 means actually logged out user, not to get into a loop of refresh attempts. And not forget everything else on the acceptance criteria π
I saw your post on upwork. Can I contribute to this issue? @vygandas
@PhamAnhHoang, how long this will take, what do you think? It's important for me that this ticket won't get hanging for too long.
You can tell me your desired deadline and I will try my best to do it @vygandas
@PhamAnhHoang , well, it's not a very small task and I don't know how much time you will spend daily, that's why you're the best who can tell me when you think you'd be done with it.
I think it will take around 40 hours, so I can complete this task on Monday,
@PhamAnhHoang please apply on upwork so I could send an offer
This is my Upwork profile: https://www.upwork.com/freelancers/~017c46c5e110925052. I canβt see your post anymore. Can you message me? @vygandas
@PhamAnhHoang invitation sent β
Some notes before digging deeper
What
The platform needs to have a complete
email+password
authentication system in place. Also, it should be thought through really well for future scaling. A lot of it has already been implemented, but it's not finished, and some parts are missing. This task is all about finishing it and implementing what's left. Refer to Acceptance Criteria to know what will be tested to consider this task complete and done.Note: The next task will be to create an auth with a magic link and oAuth providers like Apple, Google, Facebook, Github, etc., so keep that in mind when designing the whole auth core.
Why
Well, probably all SaaS projects have a sign-up and sign-in and password reset. Without authentication, it would be quite complicated to get anything done. That's why we implement this core element of any SaaS project.
In addition, default organization for every new user
Every new user gets an organization silently created by default also. If developers need this functionality, it will be easily extendable. If it's unnecessary - they don't need to do anything about it - it will sit in the background.
For reference
For one email there should be one user entity. Users can be in one (by default) or invited to many organizations. The user has a separate profile per organization. That profile would hold a name, avatar, and other things that are related to that tied organization. This way, user authentication data is kept in one place, but identity per org is kept separate. Since this is a universal starter project, we can just guess how this can be used, but with this approach, we can be sure we can implement something like Jira, Trello, Hubspot, and DigitalOcean has, but also we will be able to keep it super simple, or even hide organization, and completely ignore it in the project if that's not needed.
Here's DigitalOcean example of multiple teams (here it's actually separate organizations with different owners, billing details and companies π)
This is not a design or something to do, it's just for context! βπ»
π₯ Acceptance Criteria
libs/impl
, there should be no UI-related method calls - use callback functions and implement it on the app side (in this case, toast needs to be moved out)Every API call has to have e2e test (https://nx.dev/nx-api/cypress)Every frontend page has to have e2e test to check proper renderingUnit and e2e test are running on every commit to PR