Move challenge urls into config

This commit is contained in:
Fedor Indutny 2023-04-06 14:49:24 -07:00 committed by GitHub
parent 7f772e49b6
commit 3e586be46a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 25 additions and 10 deletions

View file

@ -7,6 +7,7 @@ import type { Plugin } from 'intl-tel-input';
import intlTelInput from 'intl-tel-input';
import { strictAssert } from '../util/assert';
import * as log from '../logging/log';
import { parseNumber } from '../util/libphonenumberUtil';
import { getChallengeURL } from '../challenge';
@ -128,7 +129,9 @@ export function StandaloneRegistration({
return;
}
document.location.href = getChallengeURL();
const url = getChallengeURL('registration');
log.info(`StandaloneRegistration: navigating to ${url}`);
document.location.href = url;
if (!window.Signal.challengeHandler) {
setError('Captcha handler is not ready!');
return;