Search code examples
wakanda

Set session lifetime with createUserSession()


Is there a way to set the session lifeTime for sessions created with the createUserSession() methode?

i can only find the option with loginByPassword() or loginByKey() which is not possible in this case (http://doc.wakanda.org/home2.en.html#/Wakanda Studio/0.Beta/lifeTime.303-1005364.en.html).


Solution

  • Currently, there is no way to set the session life time. However, it will be available in next v1.1.0 release.

    createUserSession({
        ID: "0001000100010001000100010001000100010001",
        name: "jsmith",
        lifeTime: 60*60, //seconds
        fullName: "Jennifer Smith"
    });
    

    Hope it helps