3

I'm building a mobile app using the Ionic framework and Wakanda. If I login to the mobile application, the session isn't stored. Does anyone know why the session gets lost after logging in?

(Logging in using a webpage does work)

    $wakanda.$login("username", "password").$promise.then(function(e) {
        if (e.result === true) {
             $wakanda.$currentUser().$promise.then(function(e){
                  console.log(e)
                  // e.result == null, so the session isn't stored. 
             })
        } else {
             //Wrong username/password
        }

    })

Thanks in advance! Jasper

Jasper
  • 31
  • 2

1 Answers1

2

You have to enable CORS in the project settings and add 127.0.0.1:8100 then the session will be stored. enter image description here

Regards.

Community
  • 1
  • 1
issam Eljohri
  • 322
  • 1
  • 6
  • 1
    I can add a comment to explain why. When we run the application with the livereload, with gulp, for development process, we use a different port to access the app, so we must tell our project that we can have access to the server through the 8100 port. – Ganbin May 25 '16 at 07:29