Create account, beside log in
The button for it, next to the two ways in that already existed. Enabled only with a server, a name and a password, since unlike SSO this one genuinely needs all three. Where the homeserver wants more than an open registration - a captcha, an email, its terms agreed to - the daemon answers with which, and with the advice to sign up on the server's own page. That is not a failure this window can fix: those stages need a person somewhere this window is not. Closes #165. Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
+1
-1
Submodule nobilis updated: 2929ff7bde...898cd5c0d1
@@ -1383,6 +1383,30 @@ function MatrixForm(): JSX.Element {
|
||||
>
|
||||
Sign in with SSO
|
||||
</button>
|
||||
{/* For somebody who has no account at all. Registration is
|
||||
user-interactive auth, so what this can complete is the flow with
|
||||
no stages - which is what an open homeserver asks for. Where the
|
||||
server wants a captcha, an email or its terms agreed to, the
|
||||
daemon says which and says to sign up on the server's own page,
|
||||
because those need a person somewhere this window is not. */}
|
||||
<button
|
||||
type="button"
|
||||
className="button subtle"
|
||||
disabled={!homeserverUrl || !userId || !password}
|
||||
title="Make a new account on this homeserver"
|
||||
onClick={() =>
|
||||
void window.moho
|
||||
.rpc('registerMatrixAccount', {
|
||||
homeserverUrl,
|
||||
username: userId.replace(/^@/, '').split(':')[0],
|
||||
password
|
||||
})
|
||||
.then(() => store.setMatrixLoginStatus('Making the account…'))
|
||||
.catch((e: Error) => store.toast('error', e.message))
|
||||
}
|
||||
>
|
||||
Create account
|
||||
</button>
|
||||
</div>
|
||||
{status && <p className="small muted">{status}</p>}
|
||||
<p className="small muted">
|
||||
|
||||
Reference in New Issue
Block a user