Commit e61ba0a
fix(webapp): stop login.magic client module crash breaking SSO redirect
The top-level createCookie call read env.NODE_ENV from ~/env.server, which
is undefined in the client bundle, so importing the route module threw. When
the inline /login email form submits (a navigation to /login/magic), Remix
loads that module, the import fails, and it hard-reloads /login instead of
following the action's redirect to /login/sso. Move the cookie into a
.server module so it never evaluates on the client.
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 7646fae commit e61ba0a
2 files changed
Lines changed: 16 additions & 12 deletions
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 37 | + | |
49 | 38 | | |
50 | 39 | | |
51 | 40 | | |
| |||
0 commit comments