{"id":21278284,"url":"https://github.com/rubyeffect/faceauth","last_synced_at":"2025-07-11T08:32:58.979Z","repository":{"id":56845363,"uuid":"85542250","full_name":"rubyeffect/faceauth","owner":"rubyeffect","description":"A simple rails engine to implement authentication using Facial recognition by: http://rubyeffect.com Documentation: ","archived":false,"fork":false,"pushed_at":"2017-03-24T08:31:25.000Z","size":482,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-16T20:03:05.287Z","etag":null,"topics":["authentication-using-face","authentication-without-passwords","devise-gem-extension","facial-recognition","findface-cloud-api","rails-engine","ruby-gem"],"latest_commit_sha":null,"homepage":"http://blog.rubyeffect.com/documentation-faceauth-gem/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rubyeffect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-20T06:24:32.000Z","updated_at":"2024-05-07T15:18:52.000Z","dependencies_parsed_at":"2022-09-17T21:43:44.715Z","dependency_job_id":null,"html_url":"https://github.com/rubyeffect/faceauth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyeffect%2Ffaceauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyeffect%2Ffaceauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyeffect%2Ffaceauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyeffect%2Ffaceauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubyeffect","download_url":"https://codeload.github.com/rubyeffect/faceauth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225708280,"owners_count":17511635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication-using-face","authentication-without-passwords","devise-gem-extension","facial-recognition","findface-cloud-api","rails-engine","ruby-gem"],"created_at":"2024-11-21T10:11:27.623Z","updated_at":"2024-11-21T10:11:28.282Z","avatar_url":"https://github.com/rubyeffect.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Faceauth\nFaceauth gem is a simple plugin which allows users to sign into any rails based web application using their face. Primarily supporting devise authentication (Please refer [Devise gem](https://github.com/plataformatec/devise)), this gem uses [FindFace Cloud API](https://findface.pro/en/) to run the face matches \u0026 authenticate users. This is aimed at simplifying the user authentication by eliminating the need to remember the passwords for multiple websites a user might be using.\n\n## Installation\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'faceauth'\n```\n\nAnd then execute:\n```bash\n$ bundle\n```\n\nOr install it yourself as:\n```bash\n$ gem install faceauth\n```\n\nNext, you need to run the generator:\n```bash\n$ rails generate faceauth:install\n```\n\n\n## Embedding in a Rails app\n\nAdd the following to your routes.rb file:\n\n``` ruby\nmount Faceauth::Engine, at: \"/\"\n```\n\n(**Note:** You may mount the server at any path, not just at \"/\")\n\nAdd two columns using migration to your devise user model in rails application. Example for column names: user_picture, last_sign_in_picture\n\nAnd run migrations:\n\n```bash\n$ rake db:migrate\n```\n\nGenerate devise views: (Assumption that you are already using devise gem for authentication platform in your rails application)\n\n```bash\nrails generate devise:views\n```\n\nadd the following in devise/shared/_links.html.erb file.\n\n``` erb\n\u003c%= link_to \"Log in using your face\", faceauth.new_session_path %\u003e\u003cbr /\u003e\n```\n(**Note:** Ensure to setup process of recording user picture during signup process and store details in :user_picture column.)\n\nNext, setup the configuration:\n\nOpen your initializers file at config/initializers/faceauth.rb where you can configure settings for faceauth as follows:\n\n```ruby\nFaceauth.configuration do |config|\n  config.model_name = \"user\"\n  config.uploader_name = \"carrierwave\"\n  config.redirect_url = \"root_path\"\n  config.findface_api_key = \"YOUR_API_KEY\"\n  config.signup_picture_column = \"user_picture\"\n  config.signin_picture_column = \"last_sign_in_picture\"\n  config.email_column = \"email\"\nend \n```\n\nThe options available are:\n\n| Option                    | Description                                                                         | Default Values                              |\n| -----------------         | -------------------------------                                                     | --------------------------------            |\n| `model_name`              | String to set devise user model .                                                   | \"user\"                                      |\n| `uploader_name`           | String to define attachments plugin used to store images.                           | \"carrierwave\" or \"paperclip\"                |\n| `redirect_url`            | String to provide location details for taking user after successful authentication. | \"root_path\"                                 |\n| `findface_api_key`        | String to set Findface API Key.                                                     | \"Findface API key\"                          |\n| `email_column`            | set column name where user email is stored                                          | \"email\"                                     |\n| `signup_picture_column`   | set column name where user picture is stored                                        | \"user_picture\"                              |\n| `signin_picture_column`   | set column name where user picture is stored recorded from faceauth sign in page    | \"last_sign_in_picture\"                      |\n\n\nEnsure you have set 'findface_api_key' and 'redirect_url' in config/initializers/faceauth.rb\n\n```ruby\nconfig.findface_api_key = \"YOUR_API_KEY\"\nconfig.redirect_url = \"root_path\" #By default, the option takes root_path of your rails application. \n```\nIf you wish to pass your custom model name \u0026 column names, please set the names using\n\n```ruby\nconfig.model_name = \"your_model_name\" \nconfig.signup_picture_column = \"custom_column_name\"\nconfig.signin_picture_column = \"custom_column_name\"                                  \n```\n\nStart using the gem 🙂\n\n\n**Note:**\n\nIn development environment please use [ngrok](https://ngrok.com/) with https protocol. As per the security standards \u0026 protocols access to microphones \u0026 webcames are allowed only through a secure channel.\n\n## Customization\n\nWe built Faceauth to help you quickly integrate form in your application. However, we don't want to be in your way when you need to customize it.\n\nSince Faceauth is an Rails engine, all its views are packaged inside the gem. These views will help you get started, but after some time you may want to change them. If this is the case, you just need to invoke the following generator, and it will copy all views to your application:\n\n```console\n$ rails generate faceauth:views\n```\n\nIf you would like to generate only a few sets of views, like the ones for the `form`\nyou can pass a list of names to the generator with the `-v` flag.\n\n```console\n$ rails generate faceuath:views -v form\n```\n\n## Testing\n\nAfter checking out the repo, run bundle to install dependencies. Then, run rspec spec to run the tests, from 'dummy' app under test suite.\n\n## Todos\n\n1. Extending this functionality for other authentication plugins.\n2. Support for ruby versions \u003c 2.2.2 .\n3. Writing more test cases.\n4. Making signin process faster. i.e. The response time of Jpeg_camera gem we use to capture picture is slow. Need to make it faster such that it improves overall user experience. \n5. User will be able to login by showing a hardcopy of photo instead of showing his face to webcam which allows successful authentication. Need to explore on this to avoid this scneario to make it more efficient and authentic. \n6. Need to check system behaviour in assuming Twins in users base and find fixes for any issues observed.\n7. Adding security question system will eliminate the use cases 5 \u0026 6 after immediate positive verification, however this addition should not hammer user experience. Need to design very intutive \u0026 flexible user sign in flow. \n  \n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/faceauth. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\nPlease ensure to follow the following steps as standard practice to contribute:\n\n1. Fork it ( https://github.com/rubyeffect/faceauth/fork )\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am 'Add some feature')\n4. Push to the branch (git push origin my-new-feature)\n5. Create a new Pull Request\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n## Authored by\n\nSandeep Mallela a.k.a Sam (sandeep@rubyeffect.com)\n\n**Contributions:**\n\nVenkatesh Vasamasetti (venkatesh@rubyeffect.com)\n\n## About RubyEffect\n\n\u003ca href=\"http://www.rubyeffect.com\" target=\"_blank\"\u003e\n  \u003cimg src=\"http://blog.rubyeffect.com/wp-content/uploads/2015/05/cropped-re_original_logo.png\" alt=\"RubyEffect\"\u003e\n\u003c/a\u003e\n\nRubyEffect builds intuitive, live and elegant software that solves real world problems. We love open source and it's community.\n\nLiked this gem? You may also like the articles we post on our [blog](http://blog.rubyeffect.com). Please do check.\n\nWe would love to work on your ideas and see them grow. Say hello @ http://rubyeffect.com/contact","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyeffect%2Ffaceauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyeffect%2Ffaceauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyeffect%2Ffaceauth/lists"}