1 Reply Latest reply on Sep 26, 2013 2:19 AM by Kutir Mobility

    callback handling with latest rhodes and rhosync

      My app is using rhosync, and now I need to give iOS7 support for which I am using rhodes.4.0.0.beta.59 gem, added rhoconnect-client and made the necessary changes for the isLoggedIn().

       

      But the client is not able to hot the rhosync, I guess due to the callback params. Though the authenticate method is entering the login callback method, but the callback is returning error_code = 9 (Not able to authenticate).


      Checked the rhosync server logs, it's not hitting the server.

       

      def authenticate

      Rho::RhoConnect.login( @params['username'], @params['password'], url_for => (:action => :login_callback, :query{username => @params['username'], 'password' => @params[:password]})

      end

       

      def login_back

      err_code = @params["error_code']

          if err_code == 0

            begin

               Rhom::Rhom.database_full_reset(false,true) unless Rho::RhoConfig.login == @params['login']

              SyncEngine.set_notification(-1,"/app/Settings/sync_notify","")

              SyncEngine.dosync(false)

            rescue

                SyncEngine.stop_sync

              @msg = "Unable to connect to Remedy server. Contact server administrator."

              WebView.navigate(url_for(:controller => :Page, :action => :authenticate_form, :query => {:msg => @msg}))

           end

            WebView.navigate(url_for(:controller => :Page, :action => :downloading_data))

          else

            msg_action = ""

            @msg = validate_sync_errors(@params, msg_action, "authenticate_form")

         end