Commit Graph

53 Commits

Author SHA1 Message Date
Ilia Mashkov
e7ac79049d chore: rewrite LoginForm to use defaults from separate files 2026-04-02 12:46:15 +03:00
Ilia Mashkov
85763e568f feat(auth): add separate default input component 2026-04-02 12:45:32 +03:00
Ilia Mashkov
98e3133d88 feat(auth): add separate default button component 2026-04-02 12:45:25 +03:00
Ilia Mashkov
8d283064a0 feat(LoginForm): use component as prop pattern to add customizable input and button components 2026-03-31 12:54:43 +03:00
Ilia Mashkov
a6f4b993dd feat(auth): set the token after login/register/logout 2026-03-31 12:53:41 +03:00
Ilia Mashkov
3d7eb850ec fix(auth): remove unnecessary token header setup 2026-03-31 12:52:43 +03:00
Ilia Mashkov
69d026afce feat(auth): add selectors for email and password 2026-03-31 12:51:41 +03:00
Ilia Mashkov
87511398fb test: change mocks to comply with the new validation 2026-03-25 10:43:47 +03:00
Ilia Mashkov
542de6c540 chore: delete empty lines between test cases 2026-03-25 10:43:09 +03:00
Ilia Mashkov
6d81eaba4b feat(auth): add validatePassword function with requirements for min and max characters amount, presence of at least one uppercase letter, one lowercase letter, one digit and one special symbol; cover it with tests 2026-03-25 10:34:54 +03:00
Ilia Mashkov
5b49398665 feat(auth): add an RFC complient validation function for an email address; cover it with tests 2026-03-25 10:18:55 +03:00
6751c7fc04 Merge pull request 'feature/login-and-register-forms' (#2) from feature/login-and-register-forms into main
Reviewed-on: #2
2026-03-24 18:00:41 +00:00
Ilia Mashkov
83fbf83bae feat(RegisterForm): add basic RegisterFormComponent with test coverage and storybook placeholder 2026-03-24 20:57:35 +03:00
Ilia Mashkov
576665f32b test(LoginForm): clarify test case names 2026-03-24 20:42:37 +03:00
Ilia Mashkov
4d854d08a3 test(LoginForm): replace setState with userEvent.type for authenticity 2026-03-24 20:29:16 +03:00
Ilia Mashkov
70bcf7fdcf feat(LoginForm): add isLoading check to LoginForm, add new test cases 2026-03-24 20:03:34 +03:00
Ilia Mashkov
c006a94c4d feat(auth): add selectStatusIsLoading selector to get information whether auth store status equals "loading" 2026-03-24 19:57:27 +03:00
Ilia Mashkov
e4630a7fcb feat(LoginForm): create LoginForm component with basic logic, test coverage and storybook placeholder 2026-03-24 19:30:45 +03:00
Ilia Mashkov
c41f02f505 chore: export modules 2026-03-24 19:29:37 +03:00
Ilia Mashkov
683443673e chore: remove unused code 2026-03-24 19:28:55 +03:00
Ilia Mashkov
1f20f11852 chore: install storybook 2026-03-24 19:28:20 +03:00
Ilia Mashkov
c378f7c83a refactor(auth): rewrite store actions, remove arguments, add checks validation and status checks; add test cases 2026-03-24 13:04:58 +03:00
Ilia Mashkov
8cea93220b feat(auth): create selectors for authStore; cover them with tests 2026-03-24 13:02:58 +03:00
Ilia Mashkov
b871bf27de feat(auth): add formData to the auth store; add corresponding setEmail and setPassword actions 2026-03-24 11:15:23 +03:00
db42c87489 Merge pull request 'feature/state-and-data-fetching' (#1) from feature/state-and-data-fetching into main
Reviewed-on: #1
2026-03-24 08:02:19 +00:00
Ilia Mashkov
6a2a826a11 refactor: create separate shared store for auth token and refresh action 2026-03-24 09:26:10 +03:00
Ilia Mashkov
fd5b50a6f2 test(auth): write basic unit tests for authStore actions 2026-03-18 09:58:30 +03:00
Ilia Mashkov
51fc64d8c3 feat(auth): add accessToken field to the store 2026-03-18 09:57:59 +03:00
Ilia Mashkov
2afbd73a31 fix(auth): fix circular import problem by changing the way the authHttpClient gets accessToken; replace individual calls mocks with the common ones 2026-03-18 09:10:17 +03:00
Ilia Mashkov
b75e805f54 feat(auth): add refresh action to authStore 2026-03-17 14:18:49 +03:00
Ilia Mashkov
226874bbec feat(auth): add refresh api call call 2026-03-17 14:15:32 +03:00
Ilia Mashkov
ed718eea71 feat(auth): add accessToken field to authStore and setup beforeRequest hook to add this token to headers 2026-03-17 14:08:29 +03:00
Ilia Mashkov
11b84ddc5d feat(auth): add error field to store and remove unused actions 2026-03-17 13:41:55 +03:00
Ilia Mashkov
98146a7996 chore: rename file 2026-03-17 13:39:32 +03:00
Ilia Mashkov
55451d3eb4 feat(auth): add basic implementation of login/register/logout store actions 2026-03-17 12:26:13 +03:00
Ilia Mashkov
aa77f4b311 feat(callApi): create callApi helper to call ky callbacks and use Go-like pattern to return [data, error] tuple 2026-03-17 12:25:23 +03:00
Ilia Mashkov
638e198d02 feat(auth): create logout api call with basic test coverage and msw mock 2026-03-17 10:14:57 +03:00
Ilia Mashkov
2f863bc5ba feat(auth): create register api call with basic test coverage and msw mock 2026-03-17 10:08:38 +03:00
Ilia Mashkov
701dc981d2 chore: add export/input shortcuts 2026-03-17 10:02:25 +03:00
Ilia Mashkov
9302013632 feat(auth): create login api call with basic test coverage and msw mock 2026-03-17 10:00:51 +03:00
Ilia Mashkov
a36922e1c7 feat(auth): create extended api config placeholder 2026-03-17 09:59:37 +03:00
Ilia Mashkov
7cf8d463f6 chore: add msw package to intercept requests and mock responces 2026-03-16 18:45:57 +03:00
Ilia Mashkov
a98a9c2c79 feat(Auth): create useAuthStore hook representing auth store using zustand 2026-03-16 18:31:53 +03:00
Ilia Mashkov
5acb326c03 feat(api): create base api using ky 2026-03-16 18:30:49 +03:00
Ilia Mashkov
3214fe716d feat(Auth): split AuthStore type to State and Actions 2026-03-16 18:29:56 +03:00
Ilia Mashkov
31f9bac50b chore: add testing packages 2026-03-16 18:29:03 +03:00
Ilia Mashkov
6bfcc4db24 chore: add testing packages 2026-03-16 18:28:41 +03:00
Ilia Mashkov
fa3f461add feature(auth): create types 2026-03-16 13:30:09 +03:00
Ilia Mashkov
7ab2d3b812 chore: setup absolute imports 2026-03-16 13:20:53 +03:00
Ilia Mashkov
d28ecef77c feat: fill the expose section of the federation config 2026-03-16 12:56:22 +03:00