Commit 44ffd55
authored
refactor: code base improvements 3 (#1072)
* refactor: extend res.{end,send,json}, redirect
* refactor: chain res methods, remove unnecessary ones
* refactor: simplify oauth callback signature
* refactor: code simplifications
* refactor: re-export everything from routes in one
* refactor: split up main index.js to multiple files
* refactor: simplify passing of provider(s) around
* refactor: extend req with callbackUrl inline
* refactor: simplify page rendering
* refactor: move error page redirects to main file, simplify renderer
* refactor: inline req.options definition
* refactor: simplify error fallbacks
* refactor: remove else branches and unnecessary try..catch
* refactor: add docs, and simplify jwt functions
* refactor: prefer errors object over switch..case in signin page
* feat: log all params sent to logger instead of only first
* refactor: fewer lines input validation
* refactor: remove even more unnecessary else branches1 parent fb8ec8a commit 44ffd55
File tree
23 files changed
+568
-623
lines changed- src
- lib
- server
- lib
- oauth
- pages
- routes
23 files changed
+568
-623
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | 48 | | |
| 49 | + | |
51 | 50 | | |
52 | 51 | | |
53 | | - | |
| 52 | + | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
| |||
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
69 | | - | |
| 68 | + | |
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
75 | 74 | | |
76 | | - | |
| 75 | + | |
77 | 76 | | |
78 | 77 | | |
79 | 78 | | |
| |||
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
86 | | - | |
| 85 | + | |
87 | 86 | | |
88 | 87 | | |
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
93 | 92 | | |
94 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
95 | 103 | | |
96 | 104 | | |
97 | 105 | | |
98 | 106 | | |
99 | 107 | | |
100 | 108 | | |
101 | 109 | | |
102 | | - | |
| 110 | + | |
103 | 111 | | |
104 | 112 | | |
105 | 113 | | |
| |||
108 | 116 | | |
109 | 117 | | |
110 | 118 | | |
111 | | - | |
| 119 | + | |
112 | 120 | | |
113 | 121 | | |
114 | 122 | | |
| |||
118 | 126 | | |
119 | 127 | | |
120 | 128 | | |
121 | | - | |
122 | | - | |
| 129 | + | |
| 130 | + | |
123 | 131 | | |
124 | 132 | | |
125 | 133 | | |
| |||
128 | 136 | | |
129 | 137 | | |
130 | 138 | | |
131 | | - | |
| 139 | + | |
132 | 140 | | |
133 | 141 | | |
134 | 142 | | |
| |||
139 | 147 | | |
140 | 148 | | |
141 | 149 | | |
142 | | - | |
| 150 | + | |
143 | 151 | | |
144 | 152 | | |
145 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
| 2 | + | |
5 | 3 | | |
6 | | - | |
7 | | - | |
8 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
9 | 7 | | |
10 | 8 | | |
11 | | - | |
12 | | - | |
13 | | - | |
| 9 | + | |
14 | 10 | | |
15 | | - | |
16 | | - | |
17 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
18 | 14 | | |
19 | 15 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
29 | 22 | | |
30 | 23 | | |
31 | 24 | | |
| |||
0 commit comments