File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -111,14 +111,15 @@ export async function decodeUserToken(
111
111
112
112
try {
113
113
// TODO: should we check for the revoked status of the token here?
114
- return adminAuth . verifyIdToken ( token /*, checkRevoked */ )
114
+ // we await to try/catch
115
+ return await adminAuth . verifyIdToken ( token /*, checkRevoked */ )
115
116
} catch ( err ) {
116
117
// TODO: some errors should probably go higher
117
118
// ignore the error and consider the user as not logged in
118
119
if ( isFirebaseError ( err ) && err . code === 'auth/id-token-expired' ) {
119
120
// Other errors to be handled: auth/argument-error
120
121
// the error is fine, the user is not logged in
121
- log ( 'info' , 'Token expired -' , err )
122
+ log ( 'info' , 'Token expired, client must revalidate' )
122
123
// TODO: this error should be accessible somewhere to instruct the user to renew their access token
123
124
} else {
124
125
// ignore the error and consider the user as not logged in
You can’t perform that action at this time.
0 commit comments