/ma_passkeys

Primary LanguageRubyApache License 2.0Apache-2.0

Easy Auth

An inclusive and usable Implementation Demo App with Passkey and Password Registration Option

New Features on top of the original app

  • Overview page which presents two possibilities: Sign up with passkeys and with password. There you are shown more information on both authentication techniques.
  • In case there is no platform authenticator, the user is redirected to the password sign up directly
  • With available platform authenticator, a user is able to register passkeys in addition to a password.

Run it locally

Prerequisites

  • Ruby
  • yarn (or npm)
  • PostgreSQL

Setup

$ git clone https://github.com/Ebano/ma_passkeys
$ cd ma_passkeys/
$ cp .env.example .env
$ bundle install
$ yarn install (or npm install)
$ bundle exec rake db:setup

Running

$ bundle exec rails s

The page is available under http://localhost:3000.


Original WebAuthn Rails Demo App

Application demonstrating a WebAuthn password-less login built with Ruby on Rails + webauthn ruby gem.

If you want to see an implementation of WebAuthn as a second factor authenticator in a Rails application, you can check it in webauthn-2fa-rails-demo.

Travis

Want to try it?

Option 1 — Visit the hosted version

Option 2 — Run it locally

Prerequisites

  • Ruby
  • yarn (or npm)
  • PostgreSQL

Setup

$ git clone https://github.com/cedarcode/webauthn-rails-demo-app
$ cd webauthn-rails-demo-app/
$ cp .env.example .env
$ bundle install
$ yarn install (or npm install)
$ bundle exec rake db:setup

Running

$ bundle exec rails s

Now you can visit http://localhost:3000 to play with the demo site.

Development

Gem Update Policy

Gemfile Version Constraints

In Gemfile define gem dependencies using a version contrainst of ~> MAJOR.MINOR by default (or ~> 0.MINOR.PATCH if latest MAJOR is 0), unless you have reasons to use something different. An example of an exception could be rails, which is known to make backwards-incompatible changes in minor level updates, so in that case we use ~> MAJOR.MINOR.PATCH.

Updating

$ gem install bundler-audit
$ bundle audit --update
$ bundle update --conservative --group test development
$ bundle update --strict --patch
$ bundle update --strict --minor
$ bundle update --major
$ bundle outdated --groups

More in:

Updating gems cheat sheet