Closed
Description
Hi there, are tokens related to a session cookie specific. How can I create a persistent token, to login as user, without having an open session?
Follow this steps:
- Login Coder
coder login URL
> Welcome to Coder, coder! You're authenticated.
-
Create a token for ~6 years
coder tokens create --lifetime 50000h
-
Check tokens
coder tokens list
ID NAME LAST USED EXPIRES AT CREATED AT
**** ***** 0001-01-01T00:00:00Z 2029-03-06T03:32:19Z 2023-06-22T19:32:19Z
-
Logout Coder
coder logout
-
Login again
coder login --token **** URL
> Welcome to Coder, coder! You're authenticated.
-
Logout Again
coder logout
-
Login again
coder login --token **** URL
You are signed out or your session has expired. Please sign in again to continue.
Try logging in using 'coder login <url>'.
-
Login without token, to create a new session
coder login URL
-
Chek tokens
coder tokens list
No tokens found.
ID NAME LAST USED EXPIRES AT CREATED AT`