This is a sample implementation of a Java Spring Boot application that offers passkey authentication. For simple passkey-first authentication, the Corbado web component is used.
Please see the full blog post to understand the detailed steps needed to integrate passkeys into Java Spring Boot apps.
├── complete
| ├── src/main
| | ├── java/com/corbado/springboot
| | | ├── FrontendController.java # Main controller which renders the HTML templates
| | | └── JsonReader.java # Fetches JSONs from web URLs
| | |
| | └── resources
| | ├── application.properties # Contains the environment variables
| | └── templates
| | ├── index.html # Login page with the Corbado web component
| | └── profile.html # Profile page with user information
| └── pom.xml # Contains info about the project and implementation details
Please follow the steps in Getting started to create and configure a project in the Corbado developer panel.
Paste your Corbado project ID in the applications.properties file.
Then you can run the project locally by executing the following command inside the /complete
folder:
./mvnw spring-boot:run