Cross Origin issue while trying to authenticate from Cordova based mobile app to Aggregate Server

Hi,

We are facing problem while trying to authenticate from phonegap(Cordova/Ionic) based mobile app to odk aggregate server. We have tried both basic and also digest to get the formlist from /formList of our server.
Our app gets the form list from https://opendatakit.appspot.com/formList perfectrly, but it is not being authenticate in our agreegate server where authentication is applied.
We have followed this ( https://bitbucket.org/javarosa/javarosa/wiki/AuthenticationAPI ) approach to connect, but failed

Can anybody please suggest us any other approach.

Thanks in advance
Debashish

Debashish,

How do you know your app is implementing the spec correctly? Start
there. For example, is basic auth working? Test your app's basic auth
implementation against http://httpbin.org.

Yaw

··· -- Need ODK consultants? https://nafundi.com provides form design, server setup, in-field training, and software development for ODK.

On Thu, Oct 29, 2015 at 9:33 AM, bengulee@gmail.com wrote:

Hi,

We are facing problem while trying to authenticate from phonegap(Cordova/Ionic) based mobile app to odk aggregate server. We have tried both basic and also digest to get the formlist from /formList of our server.
Our app gets the form list from https://opendatakit.appspot.com/formList perfectrly, but it is not being authenticate in our agreegate server where authentication is applied.
We have followed this ( https://bitbucket.org/javarosa/javarosa/wiki/AuthenticationAPI ) approach to connect, but failed

Can anybody please suggest us any other approach.

Thanks in advance
Debashish

--
You received this message because you are subscribed to the Google Groups "ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dear
Yaw,
We were trying to authenticate to our aggregate server according to your
input . But we are yet to get success.
I am sending you our authentication process with the URL of our aggregate
server and our code present in Github.
URL of our ODK aggregate server :

http://180.87.230.91:8089/ODK

Credentials:

username: superadmin

passwd: pass@123#

JS file's path to set the header present in Hithub.

Here is the link
https://github.com/ratikanta-sdrc/SDRC-Collect/blob/master/authapp2/www/js/app.js
https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fratikanta-sdrc%2FSDRC-Collect%2Fblob%2Fmaster%2Fauthapp2%2Fwww%2Fjs%2Fapp.js&sa=D&sntz=1&usg=AFQjCNGUPNthnEeLouL159uGZKZEnZ-LRw

I am also attaching the screenshots of the browser's console containing
error message with the header.

Waiting for your help eagerly.

Thanks in advance
Debashish

And please note that https://opendatakit.appspot.com allows anonymous
access. I.e., accessing forms from that server does not exercise any user
login / authentication mechanisms.

··· On Thu, Oct 29, 2015 at 1:09 AM, Debashish Das wrote:

Thanks Yaw for your response.
Let us try again with basic auth by using the reference given by you.
I will get back to you.

Regards
Debashish

On Thu, Oct 29, 2015 at 1:16 PM, Yaw Anokwa yanokwa@nafundi.com wrote:

Debashish,

How do you know your app is implementing the spec correctly? Start
there. For example, is basic auth working? Test your app's basic auth
implementation against http://httpbin.org.

Yaw

Need ODK consultants? https://nafundi.com provides form design, server
setup, in-field training, and software development for ODK.

On Thu, Oct 29, 2015 at 9:33 AM, bengulee@gmail.com wrote:

Hi,

We are facing problem while trying to authenticate from
phonegap(Cordova/Ionic) based mobile app to odk aggregate server. We have
tried both basic and also digest to get the formlist from /formList of our
server.
Our app gets the form list from
https://opendatakit.appspot.com/formList perfectrly, but it is not being
authenticate in our agreegate server where authentication is applied.
We have followed this (
https://bitbucket.org/javarosa/javarosa/wiki/AuthenticationAPI )
approach to connect, but failed

Can anybody please suggest us any other approach.

Thanks in advance
Debashish

--
You received this message because you are subscribed to the Google
Groups "ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Thanks Yaw for your response.
Let us try again with basic auth by using the reference given by you.
I will get back to you.

Regards
Debashish

··· On Thu, Oct 29, 2015 at 1:16 PM, Yaw Anokwa wrote:

Debashish,

How do you know your app is implementing the spec correctly? Start
there. For example, is basic auth working? Test your app's basic auth
implementation against http://httpbin.org.

Yaw

Need ODK consultants? https://nafundi.com provides form design, server
setup, in-field training, and software development for ODK.

On Thu, Oct 29, 2015 at 9:33 AM, bengulee@gmail.com wrote:

Hi,

We are facing problem while trying to authenticate from
phonegap(Cordova/Ionic) based mobile app to odk aggregate server. We have
tried both basic and also digest to get the formlist from /formList of our
server.
Our app gets the form list from https://opendatakit.appspot.com/formList
perfectrly, but it is not being authenticate in our agreegate server where
authentication is applied.
We have followed this (
https://bitbucket.org/javarosa/javarosa/wiki/AuthenticationAPI ) approach
to connect, but failed

Can anybody please suggest us any other approach.

Thanks in advance
Debashish

--
You received this message because you are subscribed to the Google
Groups "ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

This issue is beyond the level of support that the core team can provide.

I recommend that you set up a network analyzer / protocol sniffer (e.g.,
Wire Shark) to monitor the communications between the device and an ODK
Aggregate server, and the device and your server. That would indicate what
is going wrong in the responses your server is providing.

··· On Mon, Nov 2, 2015 at 2:15 AM, wrote:

Dear
Yaw,
We were trying to authenticate to our aggregate server according to your
input . But we are yet to get success.
I am sending you our authentication process with the URL of our aggregate
server and our code present in Github.
URL of our ODK aggregate server :

http://180.87.230.91:8089/ODK

Credentials:

username: superadmin

passwd: pass@123#

JS file's path to set the header present in Hithub.

Here is the link

https://github.com/ratikanta-sdrc/SDRC-Collect/blob/master/authapp2/www/js/app.js
https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fratikanta-sdrc%2FSDRC-Collect%2Fblob%2Fmaster%2Fauthapp2%2Fwww%2Fjs%2Fapp.js&sa=D&sntz=1&usg=AFQjCNGUPNthnEeLouL159uGZKZEnZ-LRw

I am also attaching the screenshots of the browser's console containing
error message with the header.

Waiting for your help eagerly.

Thanks in advance
Debashish

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

http://www.charlesproxy.com is also pretty great for stuff like this.

Yaw

··· -- Need ODK consultants? https://nafundi.com provides form design, server setup, in-field training, and software development for ODK.

On Tue, Nov 3, 2015 at 12:28 AM, Mitch Sundt mitchellsundt@gmail.com wrote:

This issue is beyond the level of support that the core team can provide.

I recommend that you set up a network analyzer / protocol sniffer (e.g.,
Wire Shark) to monitor the communications between the device and an ODK
Aggregate server, and the device and your server. That would indicate what
is going wrong in the responses your server is providing.

On Mon, Nov 2, 2015 at 2:15 AM, debashish@sdrc.co.in wrote:

Dear
Yaw,
We were trying to authenticate to our aggregate server according to your
input . But we are yet to get success.
I am sending you our authentication process with the URL of our aggregate
server and our code present in Github.
URL of our ODK aggregate server :

http://180.87.230.91:8089/ODK

Credentials:

username: superadmin

passwd: pass@123#

JS file's path to set the header present in Hithub.

Here is the link

https://github.com/ratikanta-sdrc/SDRC-Collect/blob/master/authapp2/www/js/app.js
https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fratikanta-sdrc%2FSDRC-Collect%2Fblob%2Fmaster%2Fauthapp2%2Fwww%2Fjs%2Fapp.js&sa=D&sntz=1&usg=AFQjCNGUPNthnEeLouL159uGZKZEnZ-LRw

I am also attaching the screenshots of the browser's console containing
error message with the header.

Waiting for your help eagerly.

Thanks in advance
Debashish

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.