Getting token from a cookie using Phauxth

I’m building a user authentication using this library: Phauxth and I’m trying use custom token authentication module using the guide from the docs: guide.

The default check if user is logged in or not is through accessing token in the request headers but I want to use cookie instead so I did these.

I create the custom auth module to grab the token from the cookie.

defmodule ShiritoriWeb.Auth.AuthenticateTokenCookie do
  use Phauxth.Authenticate.Token

  @impl true
  def authenticate(%Plug.Conn{req_cookies: %{"token" => token}}, opts) do
    verify_token(token, opts)

but it throws an error because verify_token/3 arguments but in the guide I based on, it uses verify_token/2

maybe I miss something but I can’t figure it out.

Did you not just misread? In the source of token.ex there is only verify_token/3… Which makes sense since it probably needs the (here missing) user context to verify the token against?

This issue was already solved. It was because of outdated docs.