implement github oauth and display user's name and avatar from it

This commit is contained in:
2021-11-12 20:20:40 -05:00
parent dfaa328af4
commit 540519222d
24 changed files with 226 additions and 181 deletions

View File

@@ -26,6 +26,11 @@ config :logger, :console,
# Use Jason for JSON parsing in Phoenix
config :phoenix, :json_library, Jason
config :ueberauth, Ueberauth,
providers: [
github: {Ueberauth.Strategy.Github, [default_scope: "user:email", allow_private_emails: true]}
]
# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{Mix.env()}.exs"

View File

@@ -17,6 +17,12 @@ config :entendu, Entendu.Repo,
# with webpack to recompile .js and .css sources.
config :entendu, EntenduWeb.Endpoint,
http: [port: System.get_env("PORT", "4000")],
https: [
port: 4001,
cipher_suite: :strong,
certfile: "priv/cert/selfsigned.pem",
keyfile: "priv/cert/selfsigned_key.pem"
],
debug_errors: true,
code_reloader: true,
check_origin: false,