(RuntimeError) `module` 未在 Guardian 管道中设置。如何解决这个问题?

(RuntimeError) `module` not set in Guardian pipeline . How to fix this?

Github link 我的项目。

The Tutorial I am following

我的 api(phoenix 服务器)

终端出现错误

[error] #PID<0.560.0> running Slicker.Endpoint terminated
Server: localhost:4000 (http)
Request: POST /api/users
** (exit) an exception was raised:
    ** (RuntimeError) `module` not set in Guardian pipeline
        lib/guardian/plug/pipeline.ex:240: Guardian.Plug.Pipeline.raise_error/1
        lib/guardian/plug/verify_header.ex:84: Guardian.Plug.VerifyHeader.call/2
        (slicker) web/router.ex:12: Slicker.Router.api/2
        (slicker) web/router.ex:1: Slicker.Router.match_route/4
        (slicker) web/router.ex:1: Slicker.Router.do_call/2
        (slicker) lib/slicker/endpoint.ex:1: Slicker.Endpoint.phoenix_pipeline/1
        (slicker) lib/plug/debugger.ex:123: Slicker.Endpoint."call (overridable 3)"/2
        (slicker) lib/slicker/endpoint.ex:1: Slicker.Endpoint.call/2
        (plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4
        (cowboy) /media/ankit/FE3055EB3055AB81/project/slicker/api/deps/cowboy/src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4

我认为您需要将此添加到您的管道中:

plug Guardian.Plug.Pipeline, module: App.Guardian, error_handler: App.Web.SessionController

您还应该检查您使用的 Guardian 版本是否与本教程所用的版本相同。与以前版本的库相比,他们对 Guardian 1.0 版进行了许多更改。