# HG changeset patch # User Paper # Date 1718791898 14400 # Node ID 5098387a3a46e4cb4605022d6782bc5a6427a4a7 # Parent 948955c3ba81922d845f139deb854bd90f2635be kitsu: remove unused constants, fix token expiration calculation diff -r 948955c3ba81 -r 5098387a3a46 src/services/kitsu.cc --- a/src/services/kitsu.cc Mon Jun 17 20:35:31 2024 -0400 +++ b/src/services/kitsu.cc Wed Jun 19 06:11:38 2024 -0400 @@ -28,9 +28,6 @@ using namespace nlohmann::literals::json_literals; -static constexpr std::string_view CLIENT_ID = "dd031b32d2f56c990b1425efe6c42ad847e7fe3ab46bf1299f05ecd856bdb7dd"; -static constexpr std::string_view CLIENT_SECRET = "54d7307928f63414defd96399fc31ba847961ceaecef3a5fd93144e960c0e151"; - static constexpr std::string_view BASE_API_PATH = "https://kitsu.io/api/edge"; static constexpr std::string_view OAUTH_PATH = "https://kitsu.io/api/oauth/token"; @@ -80,7 +77,7 @@ session.config.auth.kitsu.access_token = result["/access_token"_json_pointer].get(); session.config.auth.kitsu.access_token_expiration - = result["/created_at"_json_pointer].get(); + = result["/created_at"_json_pointer].get() + result["/expires_in"_json_pointer].get(); session.config.auth.kitsu.refresh_token = result["/refresh_token"_json_pointer].get();