Update to new provisioning URL scheme

This commit is contained in:
Evan Hahn 2021-09-09 17:08:19 -05:00 committed by GitHub
parent a67335272c
commit 8064560a5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 7 deletions

View file

@ -7,9 +7,8 @@ export function getProvisioningUrl(
uuid: string,
publicKey: ArrayBuffer
): string {
const params = new URLSearchParams({
uuid,
pub_key: arrayBufferToBase64(publicKey),
});
return `tsdevice:/?${params.toString()}`;
const url = new URL('sgnl://linkdevice');
url.searchParams.set('uuid', uuid);
url.searchParams.set('pub_key', arrayBufferToBase64(publicKey));
return url.toString();
}