Pricing Blog

Supabase access token time limit

  • ssssadsadasd-1386265389490765935

    ssssadsadasd

    1 month ago

    So once you login supabase gives you an access token which is usually valid for 1hour (see pic).
    after one hour I am automatically logged out of the account.
    what is the process to automatically refresh the access token using the refresht token? AI tells me this should happen automatically but is not happening in my case?

    Thanks
    1386265389733904394-image.png
  • sanedealer-1386299193840369736

    Edwin Paul

    1 month ago

    I store the refresh token as an http only cookie and use an edge function to refresh the session, this function responds with two cookie headers(access_token & refresh_token).

    Note: Multiple set cookie headers weren't possible until a very recent update, so thankful for that.
  • ssssadsadasd-1386326056792883263

    ssssadsadasd

    1 month ago

    @Edwin Paul thanks, a video or demo app woud be great for this though.
    @Andreas Møller do we have any video/app for this important process? thanks
  • andreasmoller-1386326897490661387

    Andreas Møller

    1 month ago

    We have a package and template coming that addresses this for supabase
    🙌2