lib/authlogic_connect/oauth/user.rb in authlogic-connect-0.0.3.2 vs lib/authlogic_connect/oauth/user.rb in authlogic-connect-0.0.3.3
- old
+ new
@@ -57,12 +57,14 @@
end
def authenticating_with_oauth?
return false unless oauth_provider
# Initial request when user presses one of the button helpers
- (auth_params && !auth_params[:register_with_oauth].blank?) ||
+ initial_request = (auth_params && !auth_params[:register_with_oauth].blank?)
# When the oauth provider responds and we made the initial request
- (oauth_response && auth_session && auth_session[:oauth_request_class] == self.class.name)
+ initial_response = (oauth_response && auth_session && auth_session[:oauth_request_class] == self.class.name)
+
+ return initial_request || initial_response
end
def authenticate_with_oauth
# Restore any attributes which were saved before redirecting to the oauth server
self.attributes = auth_session.delete(:authlogic_oauth_attributes)
\ No newline at end of file