File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 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(
111111
112112 try {
113113 // 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 */ )
115116 } catch ( err ) {
116117 // TODO: some errors should probably go higher
117118 // ignore the error and consider the user as not logged in
118119 if ( isFirebaseError ( err ) && err . code === 'auth/id-token-expired' ) {
119120 // Other errors to be handled: auth/argument-error
120121 // the error is fine, the user is not logged in
121- log ( 'info' , 'Token expired -' , err )
122+ log ( 'info' , 'Token expired, client must revalidate' )
122123 // TODO: this error should be accessible somewhere to instruct the user to renew their access token
123124 } else {
124125 // ignore the error and consider the user as not logged in
You can’t perform that action at this time.
0 commit comments