implement google oauth

This commit is contained in:
2022-03-01 23:12:29 -05:00
parent 45bd5ba81a
commit ebbe1c2fa0
8 changed files with 54 additions and 11 deletions

View File

@@ -30,7 +30,9 @@ config :phoenix, :json_library, Jason
config :ueberauth, Ueberauth,
providers: [
github: {Ueberauth.Strategy.Github, [default_scope: "user:email", allow_private_emails: true]}
github:
{Ueberauth.Strategy.Github, [default_scope: "user:email", allow_private_emails: true]},
google: {Ueberauth.Strategy.Google, [default_scope: "email"]}
]
config :waffle,

View File

@@ -34,6 +34,10 @@ config :ueberauth, Ueberauth.Strategy.Github.OAuth,
client_id: System.get_env("GH_OAUTH_ID"),
client_secret: System.get_env("GH_OAUTH_SECRET")
config :ueberauth, Ueberauth.Strategy.Google.OAuth,
client_id: System.get_env("GOOGLE_OAUTH_ID"),
client_secret: System.get_env("GOOGLE_OAUTH_SECRET")
# ## Using releases (Elixir v1.9+)
#
# If you are doing OTP releases, you need to instruct Phoenix