ueberauth / ueberauth_github

GitHub OAuth2 Strategy for Überauth
MIT License
102 stars 53 forks source link

Unable to access the user's email address #59

Closed kandaiiskandar closed 4 years ago

kandaiiskandar commented 4 years ago

[info] GET /auth/github/callback [debug] Processing with OathWeb.AuthController.callback/2 Parameters: %{"code" => "966b60205127a91359eb", "provider" => "github"} Pipelines: [:browser] [info] Sent 500 in 2544ms [error] #PID<0.672.0> running OathWeb.Endpoint (connection #PID<0.662.0>, stream id 2) terminated Server: localhost:4000 (http) Request: GET /auth/github/callback?code=966b60205127a91359eb ** (exit) an exception was raised: ** (RuntimeError) Unable to access the user's email address (ueberauth_github 0.8.0) lib/ueberauth/strategy/github.ex:218: Ueberauth.Strategy.Github.fetch_email!/2 (ueberauth_github 0.8.0) lib/ueberauth/strategy/github.ex:171: Ueberauth.Strategy.Github.info/1 (ueberauth_github 0.8.0) lib/ueberauth/strategy.ex:282: Ueberauth.Strategy.Github.auth/1 (ueberauth 0.6.3) lib/ueberauth/strategy.ex:319: Ueberauth.Strategy.handle_callback_result/2 (ueberauth 0.6.3) lib/ueberauth/strategy.ex:308: Ueberauth.Strategy.run_callback/2 (oath 0.1.0) lib/oath_web/controllers/auth_controller.ex:1: OathWeb.AuthController.phoenix_controller_pipeline/2 (phoenix 1.5.4) lib/phoenix/router.ex:352: Phoenix.Router.__call__/2 (oath 0.1.0) lib/oath_web/endpoint.ex:1: OathWeb.Endpoint.plug_builder_call/2 (oath 0.1.0) lib/plug/debugger.ex:132: OathWeb.Endpoint."call (overridable 3)"/2 (oath 0.1.0) lib/oath_web/endpoint.ex:1: OathWeb.Endpoint.call/2 (phoenix 1.5.4) lib/phoenix/endpoint/cowboy2_handler.ex:65: Phoenix.Endpoint.Cowboy2Handler.init/4 (cowboy 2.8.0) /opt/zandar/phoenix/oath/deps/cowboy/src/cowboy_handler.erl:37: :cowboy_handler.execute/2 (cowboy 2.8.0) /opt/zandar/phoenix/oath/deps/cowboy/src/cowboy_stream_h.erl:300: :cowboy_stream_h.execute/3 (cowboy 2.8.0) /opt/zandar/phoenix/oath/deps/cowboy/src/cowboy_stream_h.erl:291: :cowboy_stream_h.request_process/3 (stdlib 3.13) proc_lib.erl:226: :proc_lib.init_p_do_apply/3

0x6a68 commented 4 years ago

https://github.com/ueberauth/ueberauth_github#private-emails

Hanspagh commented 4 years ago

We seem to be able to handle this, else feel free to open again