Closed ukrit-himakoon closed 5 years ago
@ukrit-himakoon I suspect you're missing this value: https://github.com/ueberauth/ueberauth_example/blob/master/config/prod.secret.exs#L7
;) Thanks, sorry that I'm kinda new to phoenix.
So I need to run example in production only? How to add this to dev?
@ukrit-himakoon You're seeing this issue because this app breaks with the Phoenix conventions of putting this value in your config files. That's probably since they deployed on Heroku, and chose to inject settings from the OS environment variables instead of config files.
You can use mix phx.gen.secret
to create a new secret and then paste that value into the secret_key_base:
section of your config.exs file. Then do it again for prod.secret.exs and do not track prod.secret.exs in your source control. Instead, manually copy it to your server with SCP. You'll need to either do the same with the oauth files where there's a System.get_env
in the repo or else actually set those system environment variables in your shell before running Phoenix.
Note: If you generate a new app with mix phx.new my_app
you can see how config and secrets like this are handled in a typical app.
@AlchemistCamp we'd love contributions from the community's help to improve these examples 😁
It happens with sign in with username/password Can anyone help to solve this?