Skip to content
Permalink
Browse files

Encrypt a changed Strava API refresh token.

  • Loading branch information...
dblock committed Nov 17, 2018
1 parent c4867e2 commit 2af902f3880900bbe5ac24713d04ca89636f0c27
Showing with 3 additions and 2 deletions.
  1. +3 −2 _lib/strava.rb
@@ -17,8 +17,9 @@ def self.client

refresh_token = response['refresh_token']
if refresh_token != ENV['STRAVA_API_REFRESH_TOKEN']
puts "Warning, the Strava API refresh token has changed."
# TODO: store the new refresh token
puts "The Strava API refresh token has changed, updating .travis.yml."
rc = system("travis encrypt STRAVA_API_REFRESH_TOKEN=#{refresh_token} --add env")
fail "travis encrypt failed with exit code #{$CHILD_STATUS.exitstatus}" if rc.nil? || !rc || $CHILD_STATUS.exitstatus != 0
end

Strava::Api::V3::Client.new(access_token: response['access_token'])

0 comments on commit 2af902f

Please sign in to comment.
You can’t perform that action at this time.