Skip to content

Commit 034433f

Browse files
committed
chore: use environment variables for app secret and app id
1 parent f7f48cb commit 034433f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

app/services/api/v1/account_kit.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def get_message_and_status
1212
user_account = Facebook::AccountKit::UserAccount.new(access_token)
1313
user = User.find_or_create_user(user_account.fetch_user_info)
1414
return [{ token: get_token(user), user: user }, 200]
15-
rescue Facebook::AccountKit::InvalidRequest
15+
rescue
1616
return [{ error: "Invalid Access Token" }, "400"]
1717
end
1818
end

config/initializers/account_kit.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
Facebook::AccountKit.config do |c|
44
c.account_kit_version = "v1.0"
5-
c.account_kit_app_secret = "your account kit secret"
6-
c.facebook_app_id = "your facebook app id"
5+
c.account_kit_app_secret = ENV["kit_app_secret"]
6+
c.facebook_app_id = ENV["kit_app_id"]
77
end

0 commit comments

Comments
 (0)