{"id":15732665,"url":"https://github.com/nsweeting/ueberauth_ecwid","last_synced_at":"2025-03-31T03:42:33.897Z","repository":{"id":62430578,"uuid":"151632912","full_name":"nsweeting/ueberauth_ecwid","owner":"nsweeting","description":"An Ueberauth strategy for authenticating your application with Ecwid.","archived":false,"fork":false,"pushed_at":"2018-10-16T20:29:20.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-05T17:50:50.112Z","etag":null,"topics":["ecwid","elixir","oauth","oauth2","ueberauth"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","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/nsweeting.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-04T20:37:50.000Z","updated_at":"2021-01-23T02:02:03.000Z","dependencies_parsed_at":"2022-11-01T20:12:35.982Z","dependency_job_id":null,"html_url":"https://github.com/nsweeting/ueberauth_ecwid","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/nsweeting%2Fueberauth_ecwid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsweeting%2Fueberauth_ecwid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsweeting%2Fueberauth_ecwid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsweeting%2Fueberauth_ecwid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nsweeting","download_url":"https://codeload.github.com/nsweeting/ueberauth_ecwid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246413230,"owners_count":20773053,"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":["ecwid","elixir","oauth","oauth2","ueberauth"],"created_at":"2024-10-04T00:21:34.720Z","updated_at":"2025-03-31T03:42:33.882Z","avatar_url":"https://github.com/nsweeting.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Überauth Ecwid\n\nEcwid OAuth2 strategy for Überauth.\n\n## Installation\n\n1. Setup your application at [Ecwid](https://developers.ecwid.com/).\n\n2. Add `:ueberauth_ecwid` to your list of dependencies in `mix.exs`:\n\n    ```elixir\n    def deps do\n      [{:ueberauth_ecwid, \"~\u003e 0.1.1\"}]\n    end\n    ```\n    ```\n\n3. Add Ecwid to your Überauth configuration:\n\n    ```elixir\n    config :ueberauth, Ueberauth,\n      providers: [\n        ecwid: {Ueberauth.Strategy.Ecwid, []}\n      ]\n    ```\n\n4.  Update your provider configuration:\n\n    ```elixir\n    config :ueberauth, Ueberauth.Strategy.Ecwid.OAuth,\n      client_id: System.get_env(\"ECWID_API_KEY\"),\n      client_secret: System.get_env(\"ECWID_SECRET\")\n    ```\n\n5.  If you haven't already, create a pipeline and setup routes for your callback handler:\n\n    ```elixir\n    pipeline :auth do\n      Ueberauth.plug \"/auth\"\n    end\n\n    scope \"/auth\" do\n      pipe_through [:browser, :auth]\n\n      get \"/:provider/callback\", AuthController, :callback\n    end\n    ```\n\n6.  Create an endpoint for the callback where you will handle the `Ueberauth.Auth` struct:\n\n    ```elixir\n    defmodule MyApp.AuthController do\n      use MyApp.Web, :controller\n\n      def callback_phase(%{ assigns: %{ ueberauth_failure: fails } } = conn, _params) do\n        # do things with the failure\n      end\n\n      def callback_phase(%{ assigns: %{ ueberauth_auth: auth } } = conn, params) do\n        # do things with the auth\n      end\n    end\n    ```\n\n7. Your controller needs to implement callbacks to deal with `Ueberauth.Auth` and `Ueberauth.Failure` responses.\n\nFor an example implementation see the [Überauth Example](https://github.com/ueberauth/ueberauth_example) application.\n\n## Calling\n\nDepending on the configured url you can initial the request through:\n\n    /auth/ecwid\n\nOr with options:\n\n    /auth/ecwid?store_id=1234567\u0026scope=read_store_profile\n\nBy default the requested scope is \"read_store_profile\". Scope can be configured either explicitly as a `scope` query value on the request path or in your configuration:\n\n```elixir\nconfig :ueberauth, Ueberauth,\n  providers: [\n    ecwid: { Ueberauth.Strategy.Ecwid, [default_scope: \"read_store_profile,read_catalog,read_orders,read_customers\"] }\n  ]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsweeting%2Fueberauth_ecwid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnsweeting%2Fueberauth_ecwid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsweeting%2Fueberauth_ecwid/lists"}