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

Feature/fix fb login #81

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
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
5 changes: 4 additions & 1 deletion Cpp/odin/facebook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ bool odin::facebook::is_user_authenticated(
fb_url.query(qs);
fostlib::http::user_agent ua(fb_url);
auto response = ua.get(fb_url);
if (response->status() != 200) {
return false;
}
auto response_data = fostlib::coerce<fostlib::string>(
fostlib::coerce<fostlib::utf8_string>(response->body()->data()));
fostlib::json body = fostlib::json::parse(response_data);
Expand All @@ -56,7 +59,7 @@ bool odin::facebook::is_user_authenticated(
fostlib::json odin::facebook::get_user_detail(f5::u8view user_token) {
fostlib::url base_url(odin::c_facebook_endpoint.value());
fostlib::url::filepath_string api{"/me"};
auto fb_apps = odin::c_facebook_apps.value()["Client_ID"];
auto fb_apps = odin::c_facebook_apps.value();
for (const auto fb_app : fb_apps) {
const auto app_token = get_app_token(
fostlib::coerce<f5::u8string>(fb_app["app_id"]),
Expand Down