I found a tutorial how to create the cookies for the access of Sharepoint online: https://allthatjs.com/2012/03/28/remote-authentication-in-sharepoint-online/#comment-16537
So my application is working now with getting lists using the cookies FedAuth and rtFa (don’t need the request digest). My problem is, that I don’t know when the values of the cookies will expire and if I have to refresh them (and how). And is there a possibility either to refresh easily my cookie values instead of doing the whole process again or to set that my authentication will not expire?