From d99be559f73343f0eec30d77b57ded7421dc3327 Mon Sep 17 00:00:00 2001 From: Amin <69254513+AminGh05@users.noreply.github.com> Date: Thu, 5 Jun 2025 21:48:50 +0330 Subject: [PATCH 1/3] Update Session07 Backend.md fixed some bugs and added more description --- 02_ProjectOrientedSessions/Session07/Session07 Backend.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/02_ProjectOrientedSessions/Session07/Session07 Backend.md b/02_ProjectOrientedSessions/Session07/Session07 Backend.md index ecccd94..b2643eb 100644 --- a/02_ProjectOrientedSessions/Session07/Session07 Backend.md +++ b/02_ProjectOrientedSessions/Session07/Session07 Backend.md @@ -1,9 +1,10 @@ # Add a field in Database -- [ ] Add `User` field in `Roles` table +- [ ] Add `User` field in `Roles` table using SSMS or Seed data in DbContext file +- [ ] Make sure the property `PersonId` is nullable in `Account`, so you can add fields related to "Person" later after registeration # Branching - - [ ] Create the feature/authentication branch based on develop +- [ ] Create the feature/authentication branch based on develop # Adjusting Account and Configurations @@ -380,6 +381,7 @@ System.IdentityModel.Tokens.Jwt "ExpiryMinutes": 60 } ``` +Note that you should fill the values as you wish - these are just samples - [ ] Create `JwtSettings` and add the following method 📂 Suggested Folder: WebAPI/Authentication @@ -404,7 +406,7 @@ string GenerateToken(AuthResponseDto authResponseDto); 📂 Suggested Folder: WebAPI/Authentication use this project as a reference -https://github.com/MehrdadShirvani/AlibabaClone-Backend/blob/develop/AlibabaClone.Application/Services/AuthService.cs +https://github.com/MehrdadShirvani/AlibabaClone-Backend/blob/develop/AlibabaClone.WebAPI/Authentication/JwtGenerator.cs ## Configuring Jwt in Program.cs From c2990c20cb877831ddfb456f2d1fac1b65136541 Mon Sep 17 00:00:00 2001 From: Amin <69254513+AminGh05@users.noreply.github.com> Date: Sat, 7 Jun 2025 00:08:56 +0330 Subject: [PATCH 2/3] Update Session07 Frontend.md fixed minor bugs --- 02_ProjectOrientedSessions/Session07/Session07 Frontend.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/02_ProjectOrientedSessions/Session07/Session07 Frontend.md b/02_ProjectOrientedSessions/Session07/Session07 Frontend.md index cc07927..5d2fd3d 100644 --- a/02_ProjectOrientedSessions/Session07/Session07 Frontend.md +++ b/02_ProjectOrientedSessions/Session07/Session07 Frontend.md @@ -1,6 +1,6 @@ # Branching - - [ ] Create the feature/authentication branch based on develop +- [ ] Create the feature/authentication branch based on develop # Adding Models Create three files inside this folder: @@ -61,7 +61,7 @@ import {create} from 'zustand'; interface User {   phoneNumber: string; -  roles: any; +  roles: string[]; } @@ -161,7 +161,7 @@ This defines the overall structure of the authentication store: ## 🔹 Zustand Store Definition ```ts -export const useAuthStore = create((set) => ({ +export const useAuthStore = create((set) => ({ ... }); ``` Creates a global auth store using Zustand. `create()` accepts a function that receives `set` (used to update state) and returns the initial store state and methods. From 24e9c466670b7d8b858ab96b20d73f946c5b0d88 Mon Sep 17 00:00:00 2001 From: Amin <69254513+AminGh05@users.noreply.github.com> Date: Sat, 7 Jun 2025 00:11:34 +0330 Subject: [PATCH 3/3] Update Session07 Frontend.md fixed minor bugs --- 02_ProjectOrientedSessions/Session07/Session07 Frontend.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/02_ProjectOrientedSessions/Session07/Session07 Frontend.md b/02_ProjectOrientedSessions/Session07/Session07 Frontend.md index 5d2fd3d..b1eee30 100644 --- a/02_ProjectOrientedSessions/Session07/Session07 Frontend.md +++ b/02_ProjectOrientedSessions/Session07/Session07 Frontend.md @@ -368,7 +368,7 @@ interface LoginModalProps { ## 🔹 Component Setup ```tsx -const LoginModal: React.FC = ({ onClose }) => { +const LoginModal: React.FC = ({ onClose }) => { ... }; ``` Defines a functional React component with the `onClose` prop destructured.