Skip to content

Commit b62c034

Browse files
committed
fix(api): url parsing used for device registration has changed over node versions
1 parent 775ecd0 commit b62c034

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/api/src/schemas/devices.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function encodeDeviceRegistrationURI(
2222

2323
export function decodeDeviceRegistrationURI(uri: string) {
2424
const url = new URL(uri)
25-
if (url.protocol !== 'e2esdk:' || url.pathname !== '//register-device') {
25+
if (url.protocol !== 'e2esdk:' || url.host !== 'register-device') {
2626
throw new Error('Invalid device registration data')
2727
}
2828
const userId = identitySchema.shape.userId.parse(

0 commit comments

Comments
 (0)