Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable facebook login #356

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ config :ueberauth, Ueberauth,
]

config :ueberauth, Ueberauth.Strategy.Google.OAuth,
client_id: "",
client_secret: ""
client_id: "34361115589-0qbjmuh1orf3a59ushvvpahj2a7e3nqu.apps.googleusercontent.com",
client_secret: "9reIErXRW4a0sMvfkxi8yhWM"

# Linkedin authentication configuration
config :ueberauth, Ueberauth,
Expand All @@ -44,6 +44,16 @@ config :ueberauth, Ueberauth,
]

config :ueberauth, Ueberauth.Strategy.LinkedIn.OAuth,
client_id: "77oypqbpa236ch",
client_secret: "uj3PCnO7U9RGYadT"

# Facebook Uberauth configuration
config :ueberauth, Ueberauth,
providers: [
facebook: {Ueberauth.Strategy.Facebook, []}
]
#facebook (provider) configuration
config :ueberauth, Ueberauth.Strategy.Facebook.OAuth,
client_id: "",
client_secret: ""

Expand All @@ -54,12 +64,12 @@ config :ueberauth, Ueberauth,
]

config :ueberauth, Ueberauth.Strategy.Github.OAuth,
client_id: "",
client_secret: ""
client_id: "4a4208b91287caaa3c9f",
client_secret: "f9a66591504ae801955cb2282204fc5f4c0d9621"

config :quadquizaminos,
# add github_id of authorized users
github_ids: [1, 2],
github_ids: [32_665_021],
conference_date: ~U[2021-05-18 18:40:00Z],

# set bottom vulnerability defaulting value
Expand Down
3 changes: 3 additions & 0 deletions lib/quadquizaminos_web/views/page_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ defmodule QuadquizaminosWeb.PageView do
<a class = "button" href="<%= Routes.auth_path(QuadquizaminosWeb.Endpoint, :request, "linkedin") %>">
Sign in with LinkedIn
</a>
<a class = "button" href="<%= Routes.auth_path(QuadquizaminosWeb.Endpoint, :request, "facebook") %>">
Sign in with Facebook
</a>
"""
end

Expand Down
2 changes: 2 additions & 0 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ defmodule Quadquizaminos.MixProject do
:ueberauth_github,
:ueberauth_google,
:ueberauth_linkedin,
:ueberauth_facebook,
:ueberauth,
:mix
]
Expand Down Expand Up @@ -74,6 +75,7 @@ defmodule Quadquizaminos.MixProject do
{:ueberauth_github, "~> 0.7"},
{:ueberauth_linkedin, git: "https://github.com/fajarmf/ueberauth_linkedin"},
{:ueberauth_google, "~>0.10"},
{:ueberauth_facebook, "~> 0.8"},
{:sbom, git: "https://github.com/voltone/sbom", runtime: false},
{:earmark, "~> 1.4"}
]
Expand Down
1 change: 1 addition & 0 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"telemetry_metrics": {:hex, :telemetry_metrics, "0.6.0", "da9d49ee7e6bb1c259d36ce6539cd45ae14d81247a2b0c90edf55e2b50507f7b", [:mix], [{:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "5cfe67ad464b243835512aa44321cee91faed6ea868d7fb761d7016e02915c3d"},
"telemetry_poller": {:hex, :telemetry_poller, "0.5.1", "21071cc2e536810bac5628b935521ff3e28f0303e770951158c73eaaa01e962a", [:rebar3], [{:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "4cab72069210bc6e7a080cec9afffad1b33370149ed5d379b81c7c5f0c663fd4"},
"ueberauth": {:hex, :ueberauth, "0.6.3", "d42ace28b870e8072cf30e32e385579c57b9cc96ec74fa1f30f30da9c14f3cc0", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "afc293d8a1140d6591b53e3eaf415ca92842cb1d32fad3c450c6f045f7f91b60"},
"ueberauth_facebook": {:hex, :ueberauth_facebook, "0.8.1", "c254be4ab367c276773c2e41d3c0fe343ae118e244afc8d5a4e3e5c438951fdc", [:mix], [{:oauth2, "~> 1.0 or ~> 2.0", [hex: :oauth2, repo: "hexpm", optional: false]}, {:ueberauth, "~> 0.6.0", [hex: :ueberauth, repo: "hexpm", optional: false]}], "hexpm", "c2cf210ef45bd20611234ef17517f9d1dff6b31d3fb6ad96789143eb0943f540"},
"ueberauth_github": {:hex, :ueberauth_github, "0.8.0", "2216c8cdacee0de6245b422fb397921b64a29416526985304e345dab6a799d17", [:mix], [{:oauth2, "~> 1.0 or ~> 2.0", [hex: :oauth2, repo: "hexpm", optional: false]}, {:ueberauth, "~> 0.6.0", [hex: :ueberauth, repo: "hexpm", optional: false]}], "hexpm", "b65ccc001a7b0719ba069452f3333d68891f4613ae787a340cce31e2a43307a3"},
"ueberauth_google": {:hex, :ueberauth_google, "0.10.0", "ae00e7228207be977d5cdd0a562e39961851cea74f513aab6446cb51468f283c", [:mix], [{:oauth2, "~> 1.0 or ~> 2.0", [hex: :oauth2, repo: "hexpm", optional: false]}, {:ueberauth, "~> 0.6.3", [hex: :ueberauth, repo: "hexpm", optional: false]}], "hexpm", "148e2575fd24a29b8bcaa44f9d3d1a38550a74ceed645f5059d4516b93992650"},
"ueberauth_linkedin": {:git, "https://github.com/fajarmf/ueberauth_linkedin", "eb016181c36e49a0d4fb6c69de2293a3d5813142", []},
Expand Down