Results 1 to 7 of 7

Thread: Cross Domain Session Authentication

  1. #1
    Sencha Premium User
    Join Date
    Feb 2017
    Posts
    43
    Answers
    2

    Default Cross Domain Session Authentication

    Has anyone tried hooking up Sencha to a test database via an API that runs on port 80 while Sencha Test runs on its port of 8700/8800? I am using Django and Tastypie and since session cookies can't be shared cross-domain, I am wondering if anyone else has run into something similar and how they accomplished this?

  2. #2
    Sencha - Test Dev Team marcelofarias's Avatar
    Join Date
    Nov 2011
    Location
    Boca Raton, FL
    Posts
    75
    Answers
    5

    Default

    We're currently revisiting the way we load assets in the sandbox where the tests are ran in WebDriver scenarios. In the next Sencha Test release you will find all libraries and test suites loaded via require(), so they will be seen as modules instead of HTTP scripts (which means you will be able to require any Node.js modules you want from your test suites). Also, the sandbox security settings will be tweaked so you will be able to do cross-domain operations if needed.
    Marcelo Bukowski de Farias

  3. #3
    Sencha Premium User
    Join Date
    Feb 2017
    Posts
    43
    Answers
    2

    Default

    Ok as a workaround I was able to point Sencha Test to the remote webserver via changing the Test Subject URL so now I don't run into any cross-origin problems. And it seems to load everything just fine using the API and test database we already have setup for that webserver.

  4. #4
    Sencha - Test Dev Team marcelofarias's Avatar
    Join Date
    Nov 2011
    Location
    Boca Raton, FL
    Posts
    75
    Answers
    5

    Default

    Glad you found a solution. Just checking: is it an in-browser scenario? We can consider the ability to add custom URLs to the proxy in the future. Do you think it would help in your case?
    Marcelo Bukowski de Farias

  5. #5
    Sencha Premium User
    Join Date
    Feb 2017
    Posts
    43
    Answers
    2

    Default

    Yes, it is in-browser. I'm not sure what you mean by adding custom URLs in this case? Isn't that what the test subject URL field is for? Wouldn't Sencha need to proxy locally so it can inject the tests?

  6. #6
    Sencha - Test Dev Team marcelofarias's Avatar
    Join Date
    Nov 2011
    Location
    Boca Raton, FL
    Posts
    75
    Answers
    5

    Default

    I was thinking about allowing some thing like this:

    - Have the app proxied as usual behind port 8700
    - If you have Django/Tastypie hosted at someserver:8080/api, have it proxied as localhost:8700/api (that would be part of the scenario configuration)

    But, again, this is something for future consideration
    Marcelo Bukowski de Farias

  7. #7
    Sencha Premium User
    Join Date
    Feb 2017
    Posts
    43
    Answers
    2

    Default

    Does the browser consider that Cross Origin or no? Because our issue mainly lies in the fact cookies don't get sent Cross Origin.

Similar Threads

  1. White listing a domain for cross-domain requests
    By Sylvain Lajoie in forum Sencha Cmd
    Replies: 1
    Last Post: 22 Apr 2013, 1:42 PM
  2. Cross Domain Session Managment
    By fujy in forum Ext: Q&A
    Replies: 2
    Last Post: 19 Dec 2012, 2:21 AM
  3. Cross Domain Authentication - Best Practice?
    By hoferchr in forum Sencha Touch 2.x: Discussion
    Replies: 1
    Last Post: 9 Sep 2012, 12:19 PM
  4. Cross Domain Oauth 1.0 Authentication - Help
    By Keith Chadwick in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 23 May 2011, 4:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •