Internal server error when using Guardian in user authentication

Hi all, am trying to create a user authentication in Phoenix using guardian. I have set up everything but when I start the server I get the following error. Any ideas?

You have no :secret_key_base configured for your endpoint.

In this blog post about session stores is an example.

i have it already configured…checkout my repo

As I said, you haven’t configured :secret_key_base for your endpoint, please check the linked blog post.

PS: You do not want your production value to leak into the public.

lemme check will revert

As I just realise.

What you have configured was Guardians secret key. But the error message is asking for the :secret_key_base of your endpoint, those are different settings with different meanings.

Still, as secrets, they shouldn’t appear in your public source code repositories, except for maybe the secrets you use for dev only. I tend to keep those simple like "development_only_secret_please_do_not_use_me_in_production" or similar.

1 Like