Skip to content

Commit

Permalink
chore: add token expire time
Browse files Browse the repository at this point in the history
  • Loading branch information
ronger-x committed May 2, 2024
1 parent fbc6fc5 commit 37f9894
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion playground-refresh/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<pre>Status: {{ status }}</pre>
<pre>Data: {{ data }}</pre>
<pre>Last refresh at: {{ lastRefreshedAt?.toUTCString() ?? 'No date' }}</pre>
<pre>token expired time: {{ tokenExpiredTime?.toUTCString() ?? 'No date' }}</pre>
<pre>Token: {{ token ?? 'No token' }}</pre>
<pre>Refresh token: {{ refreshToken ?? 'No refresh token' }}</pre>

Expand Down Expand Up @@ -41,7 +42,17 @@
</template>

<script lang="ts" setup>
const { status, data, lastRefreshedAt, token, refreshToken, signIn, signOut, refresh } = useAuth()
const {
status,
data,
lastRefreshedAt,
token,
refreshToken,
signIn,
signOut,
refresh,
tokenExpiredTime,
} = useAuth()

const loginModel = ref({
username: 'admin',
Expand Down

0 comments on commit 37f9894

Please sign in to comment.