Closed bdensmore closed 6 years ago
Did you define a guardian pipeline and configure it correctly in the config? You can find an example for an API with Guardian on my github account or additional infos in the documentation.
There's a bit more information in the guides. We haven't pushed the release so it's not available on hex yet but you can access it on github: https://github.com/ueberauth/guardian/blob/master/guides/plug/pipelines.md
@hlhr Thanks for the link to the example, that was extremely beneficial for me. I was still setting things up pre 1.0 which caused the issues I was having. Using your example app helped me to get things working.
@hassox Thank you for the added info in the guide as well.
Thank you both!
Ben
Hi!
I'm trying to implement Guardian into an API I'm working on and whenever I make a call to an endpoint I'm getting the error ** (RuntimeError)
error_handler
not set in Guardian pipeline.I'm only trying to hit the /sign_up route right now for testing this out. My router is set up like so:
My RegistrationController looks like:
Is there somewhere I should be defining an error_handler for Guardian to use? In the router I did try doing:
plug Guardian.Plug.LoadResource, error_handler: MyAppWeb.ErrorHandlerView but that leads to a different error saying ErrorHandlerView is private.
Any help would be greatly appreciated.
Thank you, Ben