User Authentication
🔐 Authentication with NextAuth¶
SaaSFast uses NextAuth for user login.
You can configure it in the file:
/app/api/auth/[...nextauth]/route.js
Supported Login Methods:¶
- ✅ Magic Links
- ✅ Google OAuth
Once you've completed at least one of the guides above, you can enable user sign-in like this:
"use client"
import { signIn } from "next-auth/react";
import config from "@/config";
const SigninButton = () => {
return (
<button
className="btn btn-primary"
onClick={() => signIn(undefined, { callbackUrl: config.auth.callbackUrl })}
>
Login
</button>
);
};
export default SigninButton;