Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix authentication

Turns out we can't be eager in calling rtm.auth.getToken if the user has
not previously authenticated us.
  • Loading branch information...
commit ce8e444db0a32b2b9499d0d14a7fa32a069f3ad8 1 parent d2bc16d
@tpope authored
Showing with 3 additions and 9 deletions.
  1. +3 −9 lib/rumember.rb
View
12 lib/rumember.rb
@@ -86,15 +86,9 @@ def authenticate
frob = dispatch('auth.getFrob')['frob']
Launchy.open(auth_url(:delete, 'frob' => frob))
first = true
- begin
- dispatch('auth.getToken', 'frob' => frob)['auth']
- rescue ResponseError => e
- puts e.message unless first
- puts 'Press enter when authentication is complete'
- $stdin.gets
- first = false
- retry
- end
+ puts 'Press enter when authentication is complete'
+ $stdin.gets
+ dispatch('auth.getToken', 'frob' => frob)['auth']
end
def reconfigure
Please sign in to comment.
Something went wrong with that request. Please try again.