feat: allow to generate access token without expires time

This commit is contained in:
Steven
2023-08-07 19:52:13 +08:00
parent e855f8c5ad
commit dadf42c09b
5 changed files with 44 additions and 32 deletions

View File

@ -25,8 +25,8 @@ const expirationOptions = [
value: 3600 * 24 * 7,
},
{
label: "Life time",
value: 3600 * 24 * 365 * 100,
label: "Never",
value: 0,
},
];

View File

@ -95,7 +95,9 @@ const AccessTokenSection = () => {
{getFormatedAccessToken(userAccessToken.accessToken)}
</td>
<td className="whitespace-nowrap px-3 py-4 text-sm text-gray-500">{String(userAccessToken.issuedAt)}</td>
<td className="whitespace-nowrap px-3 py-4 text-sm text-gray-500">{String(userAccessToken.expiresAt)}</td>
<td className="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
{String(userAccessToken.expiresAt ?? "Never")}
</td>
<td className="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium">
<button
className="text-indigo-600 hover:text-indigo-900"