lib/gmail/client.rb in gmail_oauth-0.1.2 vs lib/gmail/client.rb in gmail_oauth-0.1.3

- old
+ new

@@ -51,14 +51,14 @@ end alias :conn :connection # Login to specified account. def login(raise_errors=false) - @imap and @logged_in = (login = @imap.authenticate('XOAUTH', email, - :consumer_key => consumer_key, - :consumer_secret => consumer_secret, - :token => token, - :token_secret => secret + @imap and @logged_in = (login = @imap.authenticate('XOAUTH', @email, + :consumer_key => @consumer_key, + :consumer_secret => @consumer_secret, + :token => @token, + :token_secret => @secret )) && login.name == 'OK' rescue Net::IMAP::NoResponseError raise_errors and raise AuthorizationError, "Couldn't login to given GMail account" end alias :sign_in :login