fix(api): better logging for verify oauth code
This commit is contained in:
@@ -88,7 +88,7 @@ export async function githubCallback(
|
|||||||
tokens = await github.validateAuthorizationCode(code);
|
tokens = await github.validateAuthorizationCode(code);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
req.log.error('github authorization failed', {
|
req.log.error('github authorization failed', {
|
||||||
error: error instanceof Error ? error.message : 'Unknown error',
|
error,
|
||||||
provider: 'github',
|
provider: 'github',
|
||||||
});
|
});
|
||||||
return reply.status(400).send('Please restart the process.');
|
return reply.status(400).send('Please restart the process.');
|
||||||
@@ -295,7 +295,7 @@ export async function googleCallback(
|
|||||||
tokens = await google.validateAuthorizationCode(code, codeVerifier);
|
tokens = await google.validateAuthorizationCode(code, codeVerifier);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
req.log.error('google authorization failed', {
|
req.log.error('google authorization failed', {
|
||||||
error: error instanceof Error ? error.message : 'Unknown error',
|
error,
|
||||||
provider: 'google',
|
provider: 'google',
|
||||||
});
|
});
|
||||||
return reply.status(400).send('Please restart the process.');
|
return reply.status(400).send('Please restart the process.');
|
||||||
|
|||||||
Reference in New Issue
Block a user