pow-auth / pow_assent

Multi-provider authentication for your Pow enabled app
https://powauth.com
MIT License
321 stars 50 forks source link

Unhandled Strategy Error #181

Closed coladarci closed 4 years ago

coladarci commented 4 years ago

The body was:

{
  "error": "access_denied",
  "state": "[filtered]",
  "error_description": "Permissions error",
  "provider": "facebook",
  "error_reason": "user_denied",
  "error_code": "200"
}

I am assuming the user declined the access request and it then bombed on return.. using version 0.4.8

(Assent.CallbackError) Permissions error
lib/pow_assent/phoenix/controllers/authorization_controller.ex in PowAssent.Phoenix.AuthorizationController.handle_strategy_error/1 at line 207
lib/pow_assent/phoenix/controllers/authorization_controller.ex in PowAssent.Phoenix.AuthorizationController.action/2 at line 1
lib/pow_assent/phoenix/controllers/authorization_controller.ex in PowAssent.Phoenix.AuthorizationController.phoenix_controller_pipeline/2 at line 1
lib/phoenix/router.ex in Phoenix.Router.__call__/2 at line 288
lib/plug/error_handler.ex in ScorpionWeb.Router.call/2 at line 65
lib/scorpion_web/endpoint.ex in ScorpionWeb.Endpoint.plug_builder_call/2 at line 1
lib/scorpion_web/endpoint.ex in ScorpionWeb.Endpoint.call/2 at line 1
lib/phoenix/endpoint/cowboy2_handler.ex in Phoenix.Endpoint.Cowboy2Handler.init/4 at line 42

Thanks!

danschultzer commented 4 years ago

You are right, the user declined. However you shouldn't see that exception being raised with v0.4.8, as https://github.com/pow-auth/pow_assent/pull/179 resolves it.

Can you verify that you are running with the most recent PowAssent release? The stacktrace suggests that you are running with an older release.

coladarci commented 4 years ago

Thank you! I was cleaning up a few old sentry errors and didn't realize that it happened right before the bump and not after. Appreciate you!