Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 48a3be6

Browse files
committed
chore(config): mv oauth redirect-uri to config
1 parent 96de218 commit 48a3be6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

config/prod.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ config :groupher_server, GroupherServer.Repo,
8686

8787
config :groupher_server, :github_oauth,
8888
client_id: System.get_env("OAUTH_GITHUB_CLIENT_ID"),
89-
client_secret: System.get_env("OAUTH_GITHUB_CLIENT_SECRET")
89+
client_secret: System.get_env("OAUTH_GITHUB_CLIENT_SECRET"),
90+
redirect_uri: System.get_env("OAUTH_GITHUB_REDIRECT_URI")
9091

9192
config :groupher_server, :radar_search, ip_service: System.get_env("IP_LOCATE_KEY")
9293

lib/helper/oauth2/github.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ defmodule Helper.OAuth2.Github do
66
@timeout_limit 5000
77
# @client_id get_config(:github_oauth, :client_id)
88
# @client_secret get_config(:github_oauth, :client_secret)
9-
@redirect_uri "https://www.coderplanets.com/oauth"
9+
@redirect_uri get_config(:github_oauth, :redirect_uri)
1010

1111
# wired only this style works
1212
plug(Tesla.Middleware.BaseUrl, "https://github.com/login/oauth")

0 commit comments

Comments
 (0)