Add sign-in server-side logging
This commit is contained in:
parent
4f0a43e9e2
commit
4d32e763d1
@ -4,7 +4,7 @@ import FieldSetWithStatus from '@/components/FieldSetWithStatus';
|
||||
import InfoBlock from '@/components/InfoBlock';
|
||||
import SubmitButtonWithStatus from '@/components/SubmitButtonWithStatus';
|
||||
import { useLayoutEffect, useRef, useState } from 'react';
|
||||
import { signInAction } from './action';
|
||||
import { signInAction } from './actions';
|
||||
import { useFormState } from 'react-dom';
|
||||
import ErrorNote from '@/components/ErrorNote';
|
||||
import { CREDENTIALS_SIGN_IN_ERROR } from '.';
|
||||
|
||||
@ -11,6 +11,8 @@ export const signInAction = async (
|
||||
} catch (error) {
|
||||
if ((`${error}`).includes(CREDENTIALS_SIGN_IN_ERROR)) {
|
||||
return CREDENTIALS_SIGN_IN_ERROR;
|
||||
} else {
|
||||
console.log('Next Auth Error', error);
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
@ -9,7 +9,7 @@ import RepoLink from '../components/RepoLink';
|
||||
import { usePathname } from 'next/navigation';
|
||||
import { isPathAdmin, isPathSignIn, pathForAdminPhotos } from './paths';
|
||||
import SubmitButtonWithStatus from '@/components/SubmitButtonWithStatus';
|
||||
import { signOutAction } from '@/auth/action';
|
||||
import { signOutAction } from '@/auth/actions';
|
||||
import Spinner from '@/components/Spinner';
|
||||
import AnimateItems from '@/components/AnimateItems';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user