diff --git a/frontend/auth/restricted/RestrictedApi.vue b/frontend/auth/restricted/RestrictedApi.vue index e3eeeb3..2e2bf46 100644 --- a/frontend/auth/restricted/RestrictedApi.vue +++ b/frontend/auth/restricted/RestrictedApi.vue @@ -20,16 +20,19 @@ import { computed, onMounted, ref } from 'vue' import RestrictedAuth from '@/components/RestrictedAuth.vue' import RemoteAuthComplete from '@/components/RemoteAuthComplete.vue' -// Check if this is a remote auth URL: /remote/{token} or /auth/remote/{token} +// Check if this is a remote auth URL: /{token} or /auth/{token} +// The token is a 5-word passphrase like "word1.word2.word3.word4.word5" const remoteAuthToken = ref(null) function extractRemoteToken() { const path = window.location.pathname - const match = path.match(/\/(?:auth\/)?remote\/([^/]+)$/) + // Match /{token} or /auth/{token} where token is a passphrase with dots + const match = path.match(/\/(?:auth\/)?([^/]+)$/) if (match) { const token = match[1] - // Validate it looks like a passphrase (contains dots) - if (token.includes('.')) { + // Validate it looks like a passphrase (contains dots, likely 5 words) + const parts = token.split('.') + if (parts.length === 5 && parts.every(p => p.length > 0)) { return token } } diff --git a/frontend/src/components/PairingCodeEntry.vue b/frontend/src/components/PairingCodeEntry.vue index 54b8116..0ffb3b4 100644 --- a/frontend/src/components/PairingCodeEntry.vue +++ b/frontend/src/components/PairingCodeEntry.vue @@ -12,21 +12,44 @@ v-model="code" type="text" :placeholder="placeholder" - :disabled="loading" + :disabled="loading || completed" autocomplete="off" autocapitalize="characters" spellcheck="false" class="pairing-input" @input="handleInput" /> + + + +
📱 Device requesting login:
+