🎨 Reformat code for consistent indentation and improve readability
This commit is contained in:
@@ -14,12 +14,12 @@
|
|||||||
* ```javascript
|
* ```javascript
|
||||||
* import { useChallongeClientCredentials } from '@/composables/useChallongeClientCredentials'
|
* import { useChallongeClientCredentials } from '@/composables/useChallongeClientCredentials'
|
||||||
*
|
*
|
||||||
* const {
|
* const {
|
||||||
* isAuthenticated,
|
* isAuthenticated,
|
||||||
* accessToken,
|
* accessToken,
|
||||||
* authenticate,
|
* authenticate,
|
||||||
* logout,
|
* logout,
|
||||||
* saveCredentials
|
* saveCredentials
|
||||||
* } = useChallongeClientCredentials()
|
* } = useChallongeClientCredentials()
|
||||||
*
|
*
|
||||||
* // Save client credentials (one time)
|
* // Save client credentials (one time)
|
||||||
@@ -54,7 +54,10 @@ try {
|
|||||||
tokenData.value = JSON.parse(storedToken);
|
tokenData.value = JSON.parse(storedToken);
|
||||||
|
|
||||||
// Check if token is expired
|
// Check if token is expired
|
||||||
if (tokenData.value.expires_at && Date.now() >= tokenData.value.expires_at) {
|
if (
|
||||||
|
tokenData.value.expires_at &&
|
||||||
|
Date.now() >= tokenData.value.expires_at
|
||||||
|
) {
|
||||||
console.log('🔄 Client credentials token expired, will need to refresh');
|
console.log('🔄 Client credentials token expired, will need to refresh');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user