10 Commits

Author SHA1 Message Date
eebe26f706 Extract redux, http-types, http-client and test-utils 2019-09-10 17:56:25 +07:00
dffad844ad Rename scope @rondo to @rondo.dev 2019-08-25 11:33:06 +07:00
18fef76807 Add ability to login from embedded site 2019-04-15 00:13:51 +12:00
264f5aba60 Add T prefix for all type defs 2019-04-02 16:22:38 +08:00
8b6f90235e Use default action type and add status to async actions
Since TypeScript can infer types based on string types, it has became
easier to define a single constant of an action that returns a promise,
and then dispatch actions with different statuses: pending, resolved,
and/or rejected. This seems like more typing at first, but in the long
run it will become easier to write generic reducer methods, and the
names of reduced types will not have to be repeated every time.

For example, previously we had to write:

    type MyActionTypes =
      IAsyncAction<IUser, 'LOGIN_PENDING', 'LOGIN_RESOLVED', 'LOGIN_REJECTED'>
      | ...

And now we can write:

    type MyActionTypes =
      IAsyncAction<IUser, 'LOGIN'>
      | ...
2019-04-01 15:20:42 +08:00
8f8c3b6c9c Refactor action definitions to type less 2019-03-22 13:26:58 +08:00
30a8c56119 Fix test for User firstName & lastName
Also fix CSRF token. This was probably broken since csurf middleware was
modified to use cookie instead of session storage to provide support for
single page app (SPA).
2019-03-18 15:53:05 +05:00
003bccc9e8 projects/node: Add custom redirectTo after successful login 2019-03-18 13:13:52 +05:00
5a34885605 Add withForm HOC, as well as RegisterForm 2019-03-17 15:05:02 +05:00
0fcd8cbb03 Move login logic into a single folder 2019-01-20 00:48:22 +01:00