cancel
Showing results for 
Search instead for 
Did you mean: 

How to change XSA authentication session timeout?

11-09-2018 6:46 PM
hugoinperson Explorer
1932 views 1 comments
SAP Managed Tags
Subscribe

Hello, I have an UI5 (html module) app consuming an OData service (node module) in XSA. In my html module's xs-app.json, I use "route" for "authenticationMethod" and use "xsuaa" for "authenticationType" in the routes.

The problem I've observed is when my UI5 app idles for a while (not making OData requests), any subsequent OData requests will fail with "401 Unauthorized" error.

Usually refresh the page can fix this problem, and sometimes it will redirect you to UAA's login page after you refresh the page.

It seems a XSA UAA authentication session timeout problem.

I would like to know is there a way to:

  • change the timeout setting?
  • get notified when it's timed out?
  • automatically refresh the auth session?
  • programmatically refresh the auth session?

Thanks!!!

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Likes
- name: app_name
  properties:
    name: some_api
    url: '~{url}'
    timeout: 3000000
    forwardAuthToken: true 


the above in manifest.yml or mta.yml but this is deprecated i think.


the latest api says you need to set a cf env with the variable SESSION_TIMEOUT 300000 (seconds)


you have to capture the first time login time stamp store it in localstorage. Handle the session renewal by yourself by comparing timestamps in seconds with first time login time stamp.


you may also want to save the current url in local storage that way when you do refresh session you route the user to the specified url. Saving data on the page should also be handled by you.


hope it helps


update: CF default time out is 15mins