fusio icon indicating copy to clipboard operation
fusio copied to clipboard

How long does the token lives? Can we set expiry limit?

Open kidino opened this issue 6 years ago • 6 comments

I have been browsing the Fusio admin panel and I can't find anything about this. So I guess that's it then.

How long does the token lives?

Can we set expiry limit?

kidino avatar Aug 04 '18 23:08 kidino

Hi, yes , you can set the expiry limit for the tokens at the configuration.php file i.e.:

    'fusio_expire_app'        => 'P2D', // your API
    'fusio_expire_backend'    => 'PT1H', // backend app
    'fusio_expire_consumer'   => 'PT1H', // developer app

chriskapp avatar Aug 05 '18 07:08 chriskapp

Is there a why to make that the consumer token never expire? Do I need to reinstall fusio with the command "php bin/fusio install"?

jsalazar10 avatar Aug 21 '18 15:08 jsalazar10

Hi, so the consumer token does expire after 1 hour. Then the user needs to login again since the token becomes invalid. But you can change this as shown in the config above.

Regarding the second question if you want to reinstall Fusio you need to run the install command again. But you should make the installation on an empty database.

chriskapp avatar Aug 22 '18 18:08 chriskapp

how to set the configuration file so that fusio will never expire

victoralicaya avatar Aug 31 '18 06:08 victoralicaya

Maybe you can set it expire in 999 years

fusio_expire_app' => 'P999Y', // your API

kidino avatar Oct 24 '18 16:10 kidino

Yes, the solution of @kidino is basically the only solution since Fusio does not support tokens without expiration. From a security perspective it is also not recommended to create a token which never expires.

chriskapp avatar Nov 09 '18 19:11 chriskapp