{"id":13507445,"url":"https://github.com/ueberauth/ueberauth_Facebook","last_synced_at":"2025-03-30T08:30:31.626Z","repository":{"id":2341231,"uuid":"46233919","full_name":"ueberauth/ueberauth_facebook","owner":"ueberauth","description":"Facebook OAuth2 Strategy for Überauth.","archived":false,"fork":false,"pushed_at":"2023-10-12T13:59:59.000Z","size":87,"stargazers_count":78,"open_issues_count":5,"forks_count":62,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-20T20:17:13.043Z","etag":null,"topics":["facebook","oauth","oauth2","strategy","ueberauth","ueberauth-strategies"],"latest_commit_sha":null,"homepage":"","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/ueberauth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-15T20:13:58.000Z","updated_at":"2024-11-24T21:11:24.000Z","dependencies_parsed_at":"2024-05-01T15:27:45.152Z","dependency_job_id":"db80f9bd-d6d5-448c-b4b3-fe5ad3134e5c","html_url":"https://github.com/ueberauth/ueberauth_facebook","commit_stats":{"total_commits":80,"total_committers":27,"mean_commits":2.962962962962963,"dds":0.4625,"last_synced_commit":"c841f11f263ce7670b8994fa582a3240c5218ed9"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ueberauth%2Fueberauth_facebook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ueberauth%2Fueberauth_facebook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ueberauth%2Fueberauth_facebook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ueberauth%2Fueberauth_facebook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ueberauth","download_url":"https://codeload.github.com/ueberauth/ueberauth_facebook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246296356,"owners_count":20754625,"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":["facebook","oauth","oauth2","strategy","ueberauth","ueberauth-strategies"],"created_at":"2024-08-01T02:00:33.808Z","updated_at":"2025-03-30T08:30:31.315Z","avatar_url":"https://github.com/ueberauth.png","language":"Elixir","funding_links":[],"categories":["Authentication"],"sub_categories":[],"readme":"# Überauth Facebook\n\n[![Build Status](https://travis-ci.org/ueberauth/ueberauth_facebook.svg?branch=master)](https://travis-ci.org/ueberauth/ueberauth_facebook)\n[![Module Version](https://img.shields.io/hexpm/v/ueberauth_facebook.svg)](https://hex.pm/packages/ueberauth_facebook)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/ueberauth_facebook/)\n[![Total Download](https://img.shields.io/hexpm/dt/ueberauth_facebook.svg)](https://hex.pm/packages/ueberauth_facebook)\n[![License](https://img.shields.io/hexpm/l/ueberauth_facebook.svg)](https://github.com/ueberauth/ueberauth_facebook/blob/master/LICENSE)\n[![Last Updated](https://img.shields.io/github/last-commit/ueberauth/ueberauth_facebook.svg)](https://github.com/ueberauth/ueberauth_facebook/commits/master)\n\n\u003e Facebook OAuth2 strategy for Überauth.\n\n## Installation\n\n1. Setup your application at [Facebook Developers](https://developers.facebook.com).\n\n1. Add `:ueberauth_facebook` to your list of dependencies in `mix.exs`:\n\n   ```elixir\n   def deps do\n     [\n       {:ueberauth_facebook, \"~\u003e 0.8\"}\n     ]\n   end\n   ```\n\n1. Add the strategy to your applications:\n\n   ```elixir\n   def application do\n     [\n       applications: [:ueberauth_facebook]\n     ]\n   end\n   ```\n\n1. Add Facebook to your Überauth configuration:\n\n   ```elixir\n   config :ueberauth, Ueberauth,\n     providers: [\n       facebook: {Ueberauth.Strategy.Facebook, []}\n     ]\n   ```\n\n1. Update your provider configuration:\n\n   ```elixir\n   config :ueberauth, Ueberauth.Strategy.Facebook.OAuth,\n     client_id: System.get_env(\"FACEBOOK_CLIENT_ID\"),\n     client_secret: System.get_env(\"FACEBOOK_CLIENT_SECRET\")\n   ```\n\n1. Include the Überauth plug in your controller:\n\n   ```elixir\n   defmodule MyApp.AuthController do\n     use MyApp.Web, :controller\n     plug Ueberauth\n     ...\n   end\n   ```\n\n1. Create the request and callback routes if you haven't already:\n\n   ```elixir\n   scope \"/auth\", MyApp do\n     pipe_through :browser\n\n     get \"/:provider\", AuthController, :request\n     get \"/:provider/callback\", AuthController, :callback\n   end\n   ```\n\n1. 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 initialize the request through:\n\n    /auth/facebook\n\nOr with options (`auth_type`, `scope`, `locale`, `display`):\n\n    /auth/facebook?scope=email,public_profile\n\nBy default the requested scope is \"public_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    facebook: {Ueberauth.Strategy.Facebook, [default_scope: \"email,public_profile,user_friends\"]}\n  ]\n```\n\nAdditionally you can now specify the `display` param to pass to Facebook:\n\n```elixir\nconfig :ueberauth, Ueberauth,\n  providers: [\n    facebook: {Ueberauth.Strategy.Facebook, [\n      default_scope: \"email,public_profile,user_friends\",\n      display: \"popup\"\n    ]}\n  ]\n```\n\n`display` can be the following values: `page` (default), `async`, `iframe`, `popup`, `touch`, `wap`\n\nStarting with Graph API version 2.4, Facebook has limited the default fields returned when fetching the user profile.\nFields can be explicitly requested using the `profile_fields` option:\n\n```elixir\nconfig :ueberauth, Ueberauth,\n  providers: [\n    facebook: {Ueberauth.Strategy.Facebook, [profile_fields: \"name,email,first_name,last_name\"]}\n  ]\n```\n\nSee [Graph API Reference \u003e User](https://developers.facebook.com/docs/graph-api/reference/user) for full list of fields.\n\n## Copyright and License\n\nCopyright (c) 2015 Sean Callan\n\nReleased under the MIT License, which can be found in the repository in [LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fueberauth%2Fueberauth_Facebook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fueberauth%2Fueberauth_Facebook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fueberauth%2Fueberauth_Facebook/lists"}