Skip to content

UnifyID/pushauth-sample-server

Repository files navigation

PushAuthDemo

This is a sample Rails application for demonstrating basic PushAuth multi-factor authentication. See here for some background.

Functionality

  • Log in to website with username, password, and PushAuth-provided multi-factor authentication
  • Access control based on login status
  • Log out

Prerequisite

Getting Started

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

Now, create a user:

$ bundle exec rails console
> User.create(:username => "<your_username>", :password => "<your_password>")
> exit

Note that the username should match the username you enter in the corresponding mobile app.

Next, run rails credentials:edit and enter your UnifyID PushAuth API key in the following format:

unifyid:
  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!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published