This is a sample Rails application for demonstrating basic PushAuth multi-factor authentication. See here for some background.
- Log in to website with username, password, and PushAuth-provided multi-factor authentication
- Access control based on login status
- Log out
First, install Ruby and the project dependencies.
# Install project dependencies
bundle install
# Update yarn packages
yarn install --check-files
Then, initialize the database:
$ bundle exec rails db:migrate
Next, run rails credentials:edit
and enter your UnifyID PushAuth API key in the following format:
unifyid:
basic_username: <basic auth username for /users/trust webhook endpoint>
basic_password: <basic auth password for /users/trust webhook endpoint>
server_api_key: <your_key_goes_here>
Finally, fire up the dev server!
$ bundle exec rails server
You're good to go! Swing over to localhost:3000 to see the demo!