{"id":28388820,"url":"https://github.com/ueberauth/ueberauth_apple","last_synced_at":"2025-06-27T07:30:49.011Z","repository":{"id":58949151,"uuid":"534236923","full_name":"ueberauth/ueberauth_apple","owner":"ueberauth","description":"Ueberauth Strategy for Sign In with Apple","archived":false,"fork":false,"pushed_at":"2023-06-21T13:22:25.000Z","size":69,"stargazers_count":14,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-31T08:39:59.174Z","etag":null,"topics":["apple","elixir","oauth","phoenix","ueberauth"],"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":null,"security":null,"support":null}},"created_at":"2022-09-08T13:57:01.000Z","updated_at":"2025-03-06T20:30:27.000Z","dependencies_parsed_at":"2023-01-18T06:15:30.695Z","dependency_job_id":null,"html_url":"https://github.com/ueberauth/ueberauth_apple","commit_stats":null,"previous_names":["codesandbox/ueberauth_apple"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ueberauth/ueberauth_apple","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ueberauth%2Fueberauth_apple","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ueberauth%2Fueberauth_apple/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ueberauth%2Fueberauth_apple/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ueberauth%2Fueberauth_apple/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ueberauth","download_url":"https://codeload.github.com/ueberauth/ueberauth_apple/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ueberauth%2Fueberauth_apple/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262212348,"owners_count":23275915,"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":["apple","elixir","oauth","phoenix","ueberauth"],"created_at":"2025-05-30T23:15:59.079Z","updated_at":"2025-06-27T07:30:48.999Z","avatar_url":"https://github.com/ueberauth.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ueberauth Apple\n\n[![Hex.pm](https://img.shields.io/hexpm/v/ueberauth_apple)](https://hex.pm/packages/ueberauth_apple)\n[![Documentation](https://img.shields.io/badge/hex-docs-blue)](https://hexdocs.pm/ueberauth_apple)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)\n\nUeberauth plugin for Apple OAuth / _Sign In with Apple_\n\n## What is this?\n\n[Ueberauth](https://github.com/ueberauth/ueberauth) is an authentication framework for Elixir applications that specializes in [OAuth](https://oauth.net/).\nThis library is one of many [plugins](https://github.com/ueberauth/ueberauth/wiki/List-of-Strategies) (called Strategies) that allow Ueberauth to integrate with different identity providers.\nSpecifically, this one implements an OAuth integration with Apple, for their _Sign In with Apple_ service.\n\n## Important Notes\n\nApple's OAuth implementation is different than you may expect.\nPlease keep the following in mind:\n\n* There are only two scopes available, `name` and `email`, for retrieving personal information about the user signing in.\n  Neither scope provides access to any API endpoints; instead they change the data returned during the sign-in process.\n\n* If any scopes are requested during sign-in, the response from Apple **must** be in the form of a form POST request to your application.\n  Otherwise, a GET request with query parameters will occur.\n  Accepting POST callbacks require additional setup with Ueberauth that may not be necessary for other providers.\n\n* Because scoped requests must use a form POST request, any cookies that will be read during the callback phase **must** have `SameSite=None` (and, therefore, `Secure`).\n  Otherwise the browser will block them from being sent along with the POST because it is not a top-level navigation.\n\n* Apple requires a **Primary App ID** (with the _Sign In with Apple_ capability enabled), **Services ID**, and **Private Key** to be set up in their [Apple Developer Console](https://developer.apple.com/account) before integration can occur.\n\n* Apple OAuth Client Secrets are generated from a Private Key and have a maximum lifetime of six months.\n\n* Users may choose not to share their information with your application, in which case an anonymized private relay email address will be supplied during the callback phase.\n\n* Apple does not supply the user's name in callback responses after the first time.\n\n## Quick Start\n\nFor detailed instructions, see [Getting Started](guides/getting-started.md).\n\n1. Set up a Services ID and download a Private Key in the [Apple Developer Console](https://developer.apple.com/account).\n  See [Getting Started](guides/getting-started.md) or the [official documentation](https://developer.apple.com/sign-in-with-apple/get-started/) for more information\n\n2. Add `:ueberauth_apple` to your list of dependencies in `mix.exs` and run `mix deps.get`:\n\n  ```elixir\n  def deps do\n    [\n      # ...\n      {:ueberauth, \"~\u003e 0.10\"},\n      {:ueberauth_apple, \"~\u003e 0.6.1\"}\n    ]\n  end\n  ```\n\n3. Add this library as a new provider for Ueberauth (see [Getting Started](guides/getting-started.md#provider-configuration) for more information on the available options):\n\n  ```elixir\n  config :ueberauth, Ueberauth,\n    providers: [\n      # Default configuration: does not retrieve name or email address during sign-in.\n      apple: {Ueberauth.Strategy.Apple, []}\n\n      # Alternative configuration: retrieve name and email during sign-in.\n      apple: {Ueberauth.Strategy.Apple, callback_methods: [\"POST\"], default_scope: \"name email\"}\n    ]\n  ```\n\n4. Configure the provider (see [Getting Started](guides/getting-started.md#oauth-configuration) for more information on generating client secrets):\n\n  ```elixir\n  config :ueberauth, Ueberauth.Strategy.Apple.OAuth,\n    client_id: System.get_env(\"APPLE_CLIENT_ID\"),\n    client_secret: {MyApp.Apple, :client_secret}\n  ```\n\n5. Create a Client Secret generator function.\n  (Apple's Client Secrets are generated from a Private Key and have a maximum life of six months.)\n\n6. Integrate Ueberauth with the rest of your application (usually: router and controller).\n  See [Getting Started](guides/getting-started.md#plug-integration) or the [Ueberauth Example](https://github.com/ueberauth/ueberauth_example) application.\n\n## Usage\n\nMaking a request to `/auth/apple` will redirect to the Apple sign-in page with the relevant query parameters.\nYou can include a `scope` query param to configure the scopes at runtime: `/auth/apple?scope=name%20email`.\nThe default scopes can also be configured in the provider definition.\n\nTo guard against client-side request modification, it's important to still check the domain in `info.urls[:website]` within the `Ueberauth.Auth` struct if you want to limit sign-in to a specific domain.\n\n## Acknowledgments\n\nThank you to [Loop Social](https://github.com/loopsocial/) for the original implementation of this library.\n\nThank you to [CodeSandbox](https://github.com/codesandbox/) for updates and maintenance of this library.\n\n## License\n\nPlease see [LICENSE](LICENSE) for licensing details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fueberauth%2Fueberauth_apple","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fueberauth%2Fueberauth_apple","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fueberauth%2Fueberauth_apple/lists"}