sorliem
Ueberauth for Apple Sign in?
Hello!
I am looking at implementing Apple Sign in soon and was looking for an out-of-the-box solution in the Elixir community, if there was one. But, since Apple Sign In is so new, I didn’t expect to see any libraries out there.
I however came across the Ueberauth project and was wondering if there were any plans to have Apple be one of the providers?
Thank you.
Most Liked
Schultzer
If you go with GitHub - pow-auth/pow: Robust, modular, and extendable user authentication system · GitHub you get apple sign in out off the box with GitHub - pow-auth/assent: Multi-provider framework in Elixir · GitHub
danschultzer
You should call the callback method passing along the auth code:
config
|> Assent.Config.put(:session_params, %{})
|> Assent.Strategy.Apple.callback(%{"code" => apple_auth})
|> case do
{:ok, %{user: _user, token: _token}} ->
conn |> put_status(:ok) |> put_view(MyAppWeb.ErrorView) |> render(:"200")
_ ->
conn |> put_status(400) |> put_view(MyAppWeb.ErrorView) |> render(:"400")
end
:session_params are required in Assent, but in this case it can just be an empty map as you don’t need to validate state.
Remember that the :redirect_uri in the config should match your app. If I remember correctly with Apple it just has to be nil or empty string, since there’s no redirect uri in the app:
config = [
client_id: "REPLACE_WITH_SERVICES_ID",
team_id: "REPLACE_WITH_TEAM_ID",
private_key_id: "REPLACE_WITH_PRIVATE_KEY_ID",
private_key_path: "/path/to/key.p8",
redirect_uri: nil
]
sorliem
Sorry, I should have had more information. Apple says they implemented the OpenID Connect standard, but from an article by Auth0 they say
Apple is using parts of the OAuth 2.0 and OpenID Connect (OIDC) standards.
So I guess another question would be does Ueberauth support OpenID connect flows? Or just the Oauth2 protocol.
I haven’t done much experimenting with the Apple Sign in API, and this question may have been a bit premature. Apologies for that.
EDIT: Apple sign in docs i’m looking at Sign in with Apple REST API | Apple Developer Documentation
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








