We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c51218d commit 59dda94Copy full SHA for 59dda94
api/src/routes/public/auth.ts
@@ -43,13 +43,21 @@ export const mobileAuth0Routes: FastifyPluginCallback = (
43
fastify.get('/mobile-login', async (req, reply) => {
44
const email = await getEmailFromAuth0(req);
45
46
+ const logger = fastify.log.child({ req });
47
+
48
+ logger.info('Mobile app login attempt');
49
50
if (!email) {
51
+ logger.error('Could not get email from Auth0 to log in');
52
53
return reply.status(401).send({
54
message: 'We could not log you in, please try again in a moment.',
55
type: 'danger'
56
});
57
}
58
if (!isEmail(email)) {
59
+ logger.error('Email is incorrectly formatted for login');
60
61
return reply.status(400).send({
62
message: 'The email is incorrectly formatted',
63
0 commit comments