joken icon indicating copy to clipboard operation
joken copied to clipboard

Incorrect spec for Joken.Hooks.after_sign/3 callback

Open tcrossland opened this issue 2 years ago • 0 comments

The Joken.Hooks.after_sign/3 callback has the following spec:

@callback after_sign(
            hook_options,
            Joken.sign_result(),
            sign_input
          ) :: {:cont, Joken.sign_result(), sign_input} | halt_tuple

The second argument passed to the after_sign callback actually has the following type (result of Joken.Signer.sign/2):

{:ok, Joken.bearer_token()} | {:error, Joken.error_reason()}

tcrossland avatar Jun 28 '22 08:06 tcrossland