Alda Pontes
04/03/2026, 1:56 PMChris Carper
04/03/2026, 1:57 PMDevRev
04/03/2026, 1:57 PMChris Carper
04/03/2026, 1:57 PMAlda Pontes
04/03/2026, 1:57 PMChris Carper
04/03/2026, 1:58 PM<mailto:support@descope.com|support@descope.com> or use the in app plugin under the get-help section to track any issues as a ticket.Alda Pontes
04/03/2026, 3:21 PMAlda Pontes
04/03/2026, 3:21 PMAkash Jivane
04/03/2026, 3:28 PMAkash Jivane
04/03/2026, 3:53 PMconst descopeSdk = useDescope();
const resp = await descopeSdk.webauthn.signIn(loginId);
This gives you full control over when the call fires — you can gate it behind a useEffect that waits for the page to be fully ready, or check that window.location.origin is available and matches your configured domain before invoking it. This sidesteps the timing problem entirely.
Just verify one thing before you all this that what does window.location.origin return inside your webview?
In some configurations it can come back as null or a file:// path, which would cause the same origin mismatch regardless of approach.
Can you log that value and share what you see?
That's likely the root cause and will confirm whether this works as-is or needs additional webview config.Akash Jivane
04/03/2026, 3:55 PMpostMessage or a URL param
4. In the Next.js app, call descope.refresh(refreshToken) to re-establish the session
This completely avoids WebAuthn-in-webview issues. The trade-off is it requires native code changes on both platforms — but it's the most reliable path if the webview origin issue is a hard limitation.Akash Jivane
04/03/2026, 4:02 PMAlda Pontes
04/03/2026, 4:08 PMNoel
04/03/2026, 4:20 PMAkash Jivane
04/03/2026, 4:22 PMChris Carper
04/03/2026, 9:30 PMItai Hanski
04/06/2026, 10:27 AME067011 Missing domain in WebAuthn settings - this error indicates the no domain has been configured in the Descope console. Passkeys are always connected to a specific domain and so without setting a domain in the console it will not work. I think you probably have some setup issues especially if targeting mobile apps. Generally speaking you'd need to:
1. Configure a custom domain in the Descope console, for example if your domain is app.com, something like auth.app.com
2. Set app.com as the WebAuthn top level domain.
3. To support mobile, you'd need app.com to serve some /.well-known files that are required to verify domain ownership as well as some set up on the mobile side
4. The flow itself should be running under some subdomain of app.com if you serve it yourselves. You will get this out of the box with custom domain (step 1) when using the descope auth hosting.
5. The passkey action in the flow still requires and email or another form of loginId in order to identify the user. Without a screen the user isn't providing this information. Are you passing this info into the flow? Without it, it won't work as well.
I'm not sure exactly what SDKs and what setup you have - but please go through https://docs.descope.com/auth-methods/passkeys/with-sdks/mobile for the required setup before attempting to run it on mobile.Noel
04/06/2026, 1:59 PMHi @Itai Hanski. Thanks for this additional information.
We are developing a Next.js app, and are therefor using the Next.js / React / JS Descope SDK. You can ignore the fact that this web app also runs in an iOS app web view here as we're testing option 1 in web browsers.I have trouble understanding the role of
window.location.origin here. We did define a <http://auth.amaebetter.com|auth.amaebetter.com> custom domain in the Descope console a while ago. It always worked, including on localhost and .<http://vercel.app|vercel.app> domains.
Now, when we try option 1 (using descopeSdk.webauthn.signIn) on localhost, we do indeed still face this E067011 error, even when waiting 3 seconds before calling it.
We'd really prefer to avoid having to release this to production (our only <http://amaebetter.com|amaebetter.com> subdomain) in order to test if it works.Noel
04/06/2026, 2:01 PMSignIn component:
const descope = useDescope()
const [shouldShowForm, setShouldShowForm] = useState(false)
useEffect(() => {
// adding a delay doesn't change anything
setTimeout(async () => {
const lastAuth = JSON.parse(localStorage.getItem("dls_last_auth"))
const descopeResponse = await descope.webauthn.signIn(lastAuth.loginId)
if (descopeResponse.ok) {
router.push("/home")
} else {
setShouldShowForm(true)
}
}, 3000)
}, [])
return shouldShowForm ? <Descope ... /> : <Spinner />
In this case, descopeResponse is always:
{
"code": 403,
"ok": false,
"response": {},
"error": {
"errorCode": "E067011",
"errorDescription": "Missing domain in WebAuthn settings"
}
}
The AuthProvider does include the baseUrl we defined in the Descope console, and the SignIn component is a children of it:
<AuthProvider
projectId={process.env.NEXT_PUBLIC_DESCOPE_PROJECT_ID!}
sessionTokenViaCookie={{ sameSite: 'Lax' }}
refreshTokenViaCookie={{ secure: process.env['NODE_ENV'] !== 'development' }}
persistTokens={true}
storeLastAuthenticatedUser={true}
baseUrl="<https://auth.amaebetter.com>"
>
We used this URL and the SignIn component (without the useEffect) for a while and didn't face any issue.Itai Hanski
04/06/2026, 2:05 PMDid you set up WebAuthn top level domain in the descope console? Is the flow running under that domain?- this error indicates the no domain has been configured in the Descope console.E067011 Missing domain in WebAuthn settings
Noel
04/06/2026, 2:14 PMNoel
04/06/2026, 2:30 PM