The Authentication UI allows the user to log in or register with Corbado.
The UI is rendered by using the Corbado.mountAuthUI method.
Once the user is logged in, the onLoggedIn callback is executed.
main.html
Copy
Ask AI
<!DOCTYPE html><html><head> <link rel="stylesheet" href="https://unpkg.com/@corbado/web-js@2/dist/bundle/index.css" /> <script src="https://unpkg.com/@corbado/web-js@2/dist/bundle/index.js"></script><body> <script type="module"> await Corbado.load({ projectId: "pro-1234567890" }); const authElement = document.getElementById("corbadoAuth"); Corbado.mountAuthUI(authElement, { onLoggedIn: () => { console.log("User logged in"); // perform any action after the user logs in (e.g. redirect to another page) } }); </script> <div id="corbadoAuth"></div></body></html>
Corbado UI Components can be customized to match your application’s design and language preferences. You can adjust the styling and translations of the components to create a seamless user experience: