Below are complete web sample applications demonstrating FIDO2 authentication using the Arculus JavaScript SDK (arculusfido.js). These examples are useful for developers building web applications that integrate with the Arculus FIDO2 Server.
Minimal Example
This minimal example shows the essential code to register and authenticate a user without any UI scaffolding or error handling. The Web SDK only supports the client-direct pattern.
The following sections provide complete, production-ready sample applications with full error handling, UI components, and proper integration patterns.
Client-Direct Pattern
A complete HTML/JavaScript example demonstrating direct FIDO2 server communication:
HTML Structure
Enhanced Example with Error Handling
Multi-Tenant Example
For deployments with multiple relying parties:
Cross-Origin Example
When the FIDO2 Server is on a different domain:
Backend Implementation
Note: The Web SDK (arculusfido.js) only supports the client-direct pattern, where the web application communicates directly with the FIDO2 Server. There is no backend-proxied pattern for web applications.
The JavaScript SDK handles all FIDO2 Server REST API calls internally. Web developers do not need to implement a backend service for FIDO2 operations - the SDK abstracts all server communication.
If you need backend-proxied functionality for web applications, you would need to: