let me start with the error.
\
%RuntimeError{message: “Missing JWT signing secret. Please see the documentation for AshAuthentication.Jwt
for details”}
(ash_authentication 4.0.0) lib/ash_authentication/jwt/config.ex:151: AshAuthentication.Jwt.Config.token_signer/2
(ash_authentication 4.0.0) lib/ash_authentication/jwt.ex:110: AshAuthentication.Jwt.token_for_user/3
(ash_authentication 4.0.0) lib/ash_authentication/generate_token_change.ex:37: AshAuthentication.GenerateTokenChange.generate_token/3
\\
I am trying to authenticate users into a phoenix + Ash app and receive the above error. I believe it is caused when i’m Integrating LiveView since I followed the exact same steps on the ASH AUTHENTICATION guide docs with a previous App that had no liveview. Or probably its in this secret module
\\defmodule DarajaApp.Accounts.Secrets do
use AshAuthentication.Secret
def secret_for([:authentication, :tokens, :signing_secret], DarajaApp.Accounts.User, _) do
case Application.fetch_env(:example, DarajaAppWeb.Endpoint) do
{:ok, endpoint_config} →
Keyword.fetch(endpoint_config, :secret_key_base)
:error ->
:error
end
end
end
\\
Anyone who might have encountered a similar bug? Thanks in advance