https://github.com/corbado/example-passkeys-ruby-react
Ruby on Rails & React repository of a sample app that offers passkey authentication.
https://github.com/corbado/example-passkeys-ruby-react
faceid fido2 javascript passkey passkeys react ruby ruby-on-rails touchid webauthn
Last synced: 6 months ago
JSON representation
Ruby on Rails & React repository of a sample app that offers passkey authentication.
- Host: GitHub
- URL: https://github.com/corbado/example-passkeys-ruby-react
- Owner: corbado
- Created: 2023-10-04T13:01:16.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-16T16:23:04.000Z (about 1 year ago)
- Last Synced: 2025-04-10T21:56:34.587Z (6 months ago)
- Topics: faceid, fido2, javascript, passkey, passkeys, react, ruby, ruby-on-rails, touchid, webauthn
- Language: JavaScript
- Homepage: https://www.corbado.com/passkeys/ruby-on-rails
- Size: 5.19 MB
- Stars: 9
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ruby on Rails & React Passkey Example App
This is a sample implementation of a Ruby on Rails application with a React.js frontend that offers passkey
authentication. For simple passkey-first authentication, the Corbado UI components are used.Please read the [full blog post](https://www.corbado.com/blog/passkeys-ruby-on-rails-react) to see all the required
steps to integrate passkeys into a Ruby on Rails / React app.## File structure
```
...
├── app
| ...
| ├── controllers
| | └── pages_controller.rb # Controller for our pages
| |
├── config
| ...
| ├── environments
| | ├── development.rb # Development environment config
| | └── production.rb # Production environment config
| |
| └── routes.rb # The Ruby on Rails routes are configured here
|
└── frontend
...
├── .env
└── src
...
├── index.js # Root of our React.js app which also contains the React.js routes
└── routes
├── login.js # Login page containing the Corbado auth component
└── profile.js # Profile page showing information about the current user
```## Prerequisites
Please follow the steps in [Getting started](https://docs.corbado.com/overview/getting-started) to create and configure
a project in the [Corbado developer panel](https://app.corbado.com/signin#register).Open the `development.rb` and `production.rb` files under /config/environments and set the `corbado_project_id` variable
to your Corbado project ID.## Usage
Build the React frontend by heading into the frontend folder with
```bash
cd frontend
```and then run
```bash
npm i && npm run build
```Then, you can run the project locally by executing the following command:
```bash
bin/rails s
```