Skip to content

Commit 20db27f

Browse files
authored
feat: URL navigation in auth (#1603)
* bump to react 18 and install react-router-dom * Upgrade to react 18 root * update vite * add cs api's * convert state/auth to ts * add client config context * add auto discovery context * add spec version context * add auth flow context * add background dot pattern css * add promise utils * init url based routing * update auth route server path as effect * add auth server hook * always use server from discovery info in context * login - WIP * upgrade jotai to v2 * add atom with localStorage util * add multi account sessions atom * add default IGNORE res to auto discovery * add error type in async callback hook * handle password login error * fix async callback hook * allow password login * Show custom server not allowed error in mxId login * add sso login component * add token login * fix hardcoded m.login.password in login func * update server input on url change * Improve sso login labels * update folds * fix async callback batching state update in safari * wrap async callback set state in queueMicrotask * wip * wip - register * arrange auth file structure * add error codes * extract filed error component form password login * add register util function * handle register flow - WIP * update unsupported auth flow method reasons * improve password input styles * Improve UIA flow next stage calculation complete stages can have any order so we will look for first stage which is not in completed * process register UIA flow stages * Extract register UIA stages component * improve register error messages * add focus trap & step count in UIA stages * add reset password path and path utils * add path with origin hook * fix sso redirect url * rename register token query param to token * restyle auth screen header * add reset password component - WIP * add reset password form * add netlify rewrites * fix netlify file indentation * test netlify redirect * fix vite to include netlify toml * add more netlify redirects * add splat to public and assets path * fix vite base name * add option to use hash router in config and remove appVersion * add splash screen component * add client config loading and error screen * fix server picker bug * fix reset password email input type * make auth page small screen responsive * fix typo in reset password screen
1 parent bb88eb7 commit 20db27f

File tree

103 files changed

+4775
-546
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+4775
-546
lines changed

_redirects

-3
This file was deleted.

build.config.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default {
2+
base: '/',
3+
};

config.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,10 @@
88
"mozilla.org",
99
"xmr.se"
1010
],
11-
"allowCustomHomeservers": true
11+
"allowCustomHomeservers": true,
12+
13+
"hashRouter": {
14+
"enabled": false,
15+
"basename": "/"
16+
}
1217
}

index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,6 @@
9696
<audio id="inviteSound">
9797
<source src="./public/sound/invite.ogg" type="audio/ogg" />
9898
</audio>
99-
<script type="module" src="./src/index.jsx"></script>
99+
<script type="module" src="./src/index.tsx"></script>
100100
</body>
101101
</html>

netlify.toml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[[redirects]]
2+
from = "/config.json"
3+
to = "/config.json"
4+
status = 200
5+
6+
[[redirects]]
7+
from = "/manifest.json"
8+
to = "/manifest.json"
9+
status = 200
10+
11+
[[redirects]]
12+
from = "/olm.wasm"
13+
to = "/olm.wasm"
14+
status = 200
15+
16+
[[redirects]]
17+
from = "/pdf.worker.min.js"
18+
to = "/pdf.worker.min.js"
19+
status = 200
20+
21+
[[redirects]]
22+
from = "/public/*"
23+
to = "/public/:splat"
24+
status = 200
25+
26+
[[redirects]]
27+
from = "/assets/*"
28+
to = "/assets/:splat"
29+
status = 200
30+
31+
[[redirects]]
32+
from = "/*"
33+
to = "/index.html"
34+
status = 200

0 commit comments

Comments
 (0)