Session in Mobile application

Hi All,


I am implementing login into my mobile application, i am not using users api for login, created separate server action for login.

My question is how do i implement session into that server action, i need to create token at the time of login, and validate token in each request as we do it in traditional applications, also logout my user when session expires.

Can anyone help me on this??


Thanks in advance :)

Dhiraj M 

Hi Dhiraj,

- Use the Login Action from System Module, that requires only the UserId as Input

- In order to validate the Credentials before you call this Login Action, Use the PlatformPasswordUtils > ValidatePassword Action

- This way you can create a Session for any define user.

- Now it's a simple trick to log out by using the User > User_Logout Action

I did use the same approach on one of my mobile app.


In case you only want something that works like a web-session in mobile app then go for :

Client Variable's:

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Data/Handling_Data/Client_Variable


 or

 use this plugin :

 https://www.outsystems.com/forge/component-overview/5013/android-ios-shared-user-preferences

Hope it helps,

Assif

assif_tiger wrote:

Hi Dhiraj,

- Use the Login Action from System Module, that requires only the UserId as Input

- In order to validate the Credentials before you call this Login Action, Use the PlatformPasswordUtils > ValidatePassword Action

- This way you can create a Session for any define user.

- Now it's a simple trick to log out by using the User > User_Logout Action

I did use the same approach on one of my mobile app.


In case you only want something that works like a web-session in mobile app then go for :

Client Variable's:

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Data/Handling_Data/Client_Variable


 or

 use this plugin :

 https://www.outsystems.com/forge/component-overview/5013/android-ios-shared-user-preferences

Hope it helps,

Assif

Assif you din't got my question,

I have implemented login, i have created my own table(entity), I have my user id and encrypted password in this table, user can login into the application using this credentials, what i need is; i want to create a user session, at the time user logs in into the application and generate a token(JWT token, google O-auth) .

This token i will send in each request and will validate for each request.

Hope this is simplified

Hi All,



Can anyone help me on this????



Regards,

Dhiraj M