quarkusio/quarkus · error · Error
Register path is missing!
Error message
Register path is missing!
What it means
webauthn.js's register() method requires that the WebAuthn object was configured with a registerPath (where the registration result is POSTed). If it is missing, a synchronous Error is thrown before any credential ceremony begins.
Source
Thrown at extensions/security-webauthn/runtime/src/main/resources/webauthn.js:164
})
.then(res => navigator.credentials.create({publicKey: res}))
.then(credential => {
return {
id: credential.id,
rawId: bufferToBase64(credential.rawId),
response: {
attestationObject: bufferToBase64(credential.response.attestationObject),
clientDataJSON: bufferToBase64(credential.response.clientDataJSON)
},
type: credential.type
};
});
};
WebAuthn.prototype.register = function (user) {
const self = this;
if (!self.registerPath) {
throw new Error('Register path is missing!');
}
if (!user || !user.username) {
return Promise.reject('User name (user.username) required');
}
return self.registerClientSteps(user)
.then(body => {
return self.fetchWithCsrf(self.registerPath + "?" + new URLSearchParams({username: user.username}).toString(), {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify(body)
})
})
.then(res => {
if (res.status >= 200 && res.status < 300) {
return res;View on GitHub (pinned to e1c734241f)
Solutions
- Set webauthn.registerPath = '/q/webauthn/register' (or your configured endpoint) before invoking register()
- Ensure the server includes the WebAuthn client configuration (register path) when rendering the page / initializing the JS object
- Guard the call: only invoke register() on the registration page and login() on the login page
Example fix
// before const webauthn = new WebAuthn(); webauthn.register(user); // after const webauthn = new WebAuthn(); webauthn.registerPath = '/q/webauthn/register'; webauthn.register(user);
Defensive patterns
Strategy: validation
Validate before calling
if (!webauthn.registerPath) {
throw new Error('webauthn.registerPath must be set before calling register()');
}
return webauthn.register(user); Type guard
function canRegister(w) { return typeof w.registerPath === 'string' && w.registerPath.length > 0; } Try / catch
try {
webauthn.register(user);
} catch (e) {
if (e.message.includes('Register path is missing')) {
webauthn.registerPath = '/q/webauthn/register';
webauthn.register(user);
} else throw e;
} Prevention
- Always set registerPath at WebAuthn object creation time
- Centralize WebAuthn client initialization in one module
- Only call register() from the registration page
- Check server-rendered config actually injects the path
When it happens
Trigger: Calling webauthn.register(user) on a WebAuthn instance created without setting webauthn.registerPath (or with the server not sending the register path configuration to the client).
Common situations: Copy-pasted client bootstrap code that sets loginPath but not registerPath; server-side WebAuthnSecurity config missing the register endpoint so the JS helper is never initialized with it; calling register() on a page meant only for login.
Understand the failure class
Background: "missing required config value" errors: why libraries refuse to start when a configuration key is empty, unset, or blank — this error's family across 48 libraries.
Related errors
- Login path is missing!
- res.statusText
- Failed to load application configuration
- Failed to initialize application configuration
- Unrecognized option for quarkus.bootstrap.misaligned-platfor
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/364170e3b178b4b9.
Report an issue: GitHub.