{"id":21421740,"url":"https://github.com/feracommerce/omniauth-fera","last_synced_at":"2026-05-21T07:43:37.668Z","repository":{"id":50416962,"uuid":"519000088","full_name":"feracommerce/omniauth-fera","owner":"feracommerce","description":"Fera OmniAuth strategy to connect your app to a Fera account.","archived":false,"fork":false,"pushed_at":"2022-07-28T23:46:29.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-23T06:45:08.880Z","etag":null,"topics":["bigcommerce","fera","gems","magento","magento2","reviews","ruby","sdks","shopify","testimonials","ugc","user-generated-content","wix"],"latest_commit_sha":null,"homepage":"https://developers.fera.ai","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/feracommerce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-28T21:34:03.000Z","updated_at":"2022-07-28T22:51:02.000Z","dependencies_parsed_at":"2022-09-12T01:30:21.979Z","dependency_job_id":null,"html_url":"https://github.com/feracommerce/omniauth-fera","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/feracommerce%2Fomniauth-fera","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feracommerce%2Fomniauth-fera/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feracommerce%2Fomniauth-fera/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feracommerce%2Fomniauth-fera/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feracommerce","download_url":"https://codeload.github.com/feracommerce/omniauth-fera/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243926072,"owners_count":20369910,"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":["bigcommerce","fera","gems","magento","magento2","reviews","ruby","sdks","shopify","testimonials","ugc","user-generated-content","wix"],"created_at":"2024-11-22T20:37:46.765Z","updated_at":"2026-05-21T07:43:32.645Z","avatar_url":"https://github.com/feracommerce.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Checks](https://github.com/feracommerce/omniauth-fera/actions/workflows/checks.yml/badge.svg?branch=master)](https://github.com/feracommerce/omniauth-fera/actions/workflows/checks.yml)\n\n# Fera OmniAuth Strategy\n\nThis gem adds the omniauth authentication strategy using the oauth2 method for [Fera Partner Apps](https://partners.fera.ai/partner-portal/apps).\n\nTo authenticate your partner app on your own follow the instructions in [our developer docs here](https://developers.fera.ai/docs/partners-app-authentication).\n\n# Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'omniauth-fera', '~\u003e 0.1'\n```\n\nAnd then execute:\n\n    $ bundle install\n\n\n# Setup\nAdd this code to your initializer if you're using Rails (`config/initializers/fera.rb`) or somewhere else if you're not.\n```ruby\nRails.application.config.middleware.use OmniAuth::Builder do\n  provider :fera,\n           ENV['FERA_CLIENT_ID'], # Or replace with your Fera app API client ID\n           ENV['FERA_CLIENT_SECRET'], # Or replace with your Fera app API client secret\n           callback_url: ENV['FERA_REDIRECT_URI'], # Something like https://www.example.com/auth/fera/callback and should Fera App settings \n           scope: 'read write' # If you're only reading data then omit the 'write' scope.\nend\n```\nYou can find your client ID, client secret and redirect URI in the [Fera partner app edit screen](https://developers.fera.ai/docs/partners-app-authentication).\n\n# Usage\nAfter doing the above and rebooting your rack-based web server you can follow the same conventions as found in the\n[OmniAuth gem docs here](https://github.com/omniauth/omniauth).\n\nThat just means:\n1. You can start an authentication flow by going to /auth/fera\n2. You need to implement/route `/auth/fera/callback` to a controller action or something similar for your framework.\n3. Within you can grab the auth token from `request.env['omniauth.auth']['credentials']['token']` like this:\n    ```ruby\n    auth_token = request.env['omniauth.auth']['credentials']['token']\n    ```\n   Save this token value to your database so you can use it later.\n\n   BTW, you'll also receive `store_id`, `store_domain`, `owner_email` and `store_public_key` for your convenience in the GET params of the callback.\n\n\nYour auth token (AKA access token, AKA auth key) can be used as an API key to access the \n[Fera Private API documented here](https://developers.fera.ai/reference/authentication).\n\n### Pre-setting the store/shop\nIf you already know the Fera account, domain or store you want to connect to in your app you can pass the `?shop` parameter\nwith the authentication request like this: \n* `/auth/fera?shop=example.myshopify.com` (canonical domain), or\n* `/auth/fera?shop=fsto_someStoreId123` (Fera ID), or\n* `/auth/fera?shop=example.com` (vanity domain), or\n\n\n\nOnce you have an auth key you can use the Fera API easily through the [Fera API gem](https://github.com/feracommerce/fera-api-ruby) like this:\n```ruby\nFera::API.configure(auth_token) do\n  Fera::Review.all # Returns all reviews from the authorized account/store.\nend\n```\n\n# Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/feracommerce/omniauth-fera.\n\n\n### How to contribute\nTo contribute to the repository:\n\n1. Fork the repository.\n2. Clone the forked repository locally.\n3. Create a branch descriptive of your work. For example \"my_new_feature_xyz\".\n4. When you're done work, push up that branch to **your own forked repository** (not the main one).\n5. Visit https://github.com/feracommerce/omniauth-fera and you'll see an option to create a pull request from your forked branch to the master. Create a pull request.\n\n# License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferacommerce%2Fomniauth-fera","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fferacommerce%2Fomniauth-fera","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferacommerce%2Fomniauth-fera/lists"}