@ -4,7 +4,7 @@ import {
createActionURL ,
setEnvDefaults ,
} from "@auth/core" ;
import CredentialsProvider from "@auth/core/providers/credentials" ;
// import CredentialsProvider from "@auth/core/providers/credentials";
import GoogleProvider from "@auth/core/providers/google" ;
import type { Session } from "@auth/core/types" ;
// TODO: stop using universal-middleware and directly integrate server middlewares instead and/or use vike-server https://vike.dev/server. (Bati generates boilerplates that use universal-middleware https://github.com/magne4000/universal-middleware to make Bati's internal logic easier. This is temporary and will be removed soon.)
@ -41,26 +41,26 @@ const authjsConfig = {
secret : "buginoo" ,
providers : [
// TODO: Choose and implement providers
CredentialsProvider ( {
name : "Credentials" ,
credentials : {
username : { label : "Username" , type : "text" , placeholder : "jsmith" } ,
password : { label : "Password" , type : "password" } ,
} ,
async authorize() {
// Add logic here to look up the user from the credentials supplied
const user = {
id : "019900bb-61b3-7333-b760-b27784dfe33b" ,
name : "J Smith" ,
email : "jsmith@example.com" ,
} ;
// CredentialsProvider({
// name: "Credentials",
// credentials: {
// username: { label: "Username", type: "text", placeholder: "jsmith" },
// password: { label: "Password", type: "password" },
// },
// async authorize() {
// // Add logic here to look up the user from the credentials supplied
// const user = {
// id: "019900bb-61b3-7333-b760-b27784dfe33b",
// name: "J Smith",
// email: "jsmith@example.com",
// };
// Any object returned will be saved in `user` property of the JWT
// If you return null then an error will be displayed advising the user to check their details.
// You can also Reject this callback with an Error thus the user will be sent to the error page with the error message as a query parameter
return user ? ? null ;
} ,
} ) ,
// // Any object returned will be saved in `user` property of the JWT
// // If you return null then an error will be displayed advising the user to check their details.
// // You can also Reject this callback with an Error thus the user will be sent to the error page with the error message as a query parameter
// return user ?? null;
// },
// }),
GoogleProvider ( {
clientId :
"697711350664-t6237s5n3ttjd1npp1qif1aupptkr0va.apps.googleusercontent.com" ,