config/initializers/omniauth.rb in wordjelly-auth-1.1.0 vs config/initializers/omniauth.rb in wordjelly-auth-1.1.1

- old
+ new

@@ -346,10 +346,11 @@ ## but then the gem attempts authentication of the second model also, and failing that, triggers the not authenticated fallback. ## to prevent that from happening, we ignore the fallback if we are already signed in. def fallback!(entity, fallback_handler) return if self.signed_in? + fallback_handler.fallback!(self, entity) end ##how the token authentication works: ##the function regenerate_token is called whenever a change is made to the email/password/additional_login_param @@ -375,12 +376,11 @@ #puts "record is:" #puts record.attributes.to_s #puts "is it valid" #puts record.valid? res = perform_sign_in!(record, sign_in_handler) - #puts "result of signing in :" - #puts res.to_s + else #puts "the token was not correct.-------------------------" end end @@ -391,11 +391,12 @@ app_id_value = additional_identifiers["X-User-Aid"] user_es_value = additional_identifiers["X-User-Es"] token = entity.get_token_from_params_or_headers(self) - + + if token ## fails if the app id or user es is nil blank or empty #puts "returning nil" @@ -490,10 +491,10 @@ end } OmniAuth::Strategies.constants.each do |constant| - puts "Constant is: #{constant}" + #puts "Constant is: #{constant}" provider_key = constant.to_s.downcase if oauth_keys.include? provider_key