Keeping logged in status

I want to keep user logged in after first login without implementing the system from scratch.

Currently I use google sso and the package from wix to simplify using google sign in.

What is the best strategy to achieve it?
Using server returned session token works only for some time.

Works as intended. Was testing on page that tried to loggin again so missed expected behavior