sign-in changes

This commit is contained in:
Dobromir Popov
2024-05-01 13:28:01 +03:00
parent ba1400f967
commit 11cf6696ff

View File

@ -58,20 +58,26 @@ export default function SignIn({ csrfToken }) {
<div className="page">
<div className="signin">
<div className="min-h-screen flex flex-col items-center justify-center">
{/* SSO Providers */}
{/* Section for Social Sign-On Providers */}
<div className="mt-8 w-full max-w-xs px-4">
<h2 className="text-lg font-semibold text-gray-700 mb-4">Влез чрез социални медии</h2>
<button onClick={() => signIn('google', { callbackUrl: '/' })}
className="flex items-center justify-center w-full py-2 px-4 border border-gray-300 rounded shadow-sm text-sm text-gray-700 bg-white hover:bg-gray-50">
<img loading="lazy" height="24" width="24" alt="Google logo"
src="https://authjs.dev/img/providers/google.svg" className="mr-2" />
Влез чрез Google
</button>
{/* Add more buttons for other SSO providers here in similar style */}
</div>
{/* Email and Password Form */}
<form onSubmit={handleSubmit} className="mt-8 w-full max-w-xs px-4">
{/* Divider (Optional) */}
<div className="w-full max-w-xs mt-8 mb-8">
<hr className="border-t border-gray-300" />
</div>
{/* Local Account Email and Password Form */}
<form onSubmit={handleSubmit} className="w-full max-w-xs px-4">
<h2 className="text-lg font-semibold text-gray-700 mb-4">Влез с локален акаунт</h2>
<input name="csrfToken" type="hidden" defaultValue={csrfToken} />
<div className="mb-4">
<label htmlFor="email" className="block text-sm font-medium text-gray-700">имейл</label>
@ -98,11 +104,11 @@ export default function SignIn({ csrfToken }) {
Влез
</button>
{/* <button
type="button"
className="mt-4 w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-blue-600 hover:text-blue-700 focus:outline-none"
onClick={() => router.push('/auth/reset-password')}>
Забравена парола?
</button> */}
type="button"
className="mt-4 w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-blue-600 hover:text-blue-700 focus:outline-none"
onClick={() => router.push('/auth/reset-password')}>
Забравена парола?
</button> */}
</form>
</div>
</div>