Teodorant, Tech-Priest
Explore posts from serversTTCTheo's Typesafe Cult
•Created by Teodorant, Tech-Priest on 5/14/2024 in #questions
Tailwind classes aren't applying in dev and sometimes in production when login via credentials
@michaeldrotar was your issue also temp fixed by restarting the dev environment?
13 replies
TTCTheo's Typesafe Cult
•Created by Teodorant, Tech-Priest on 5/14/2024 in #questions
Tailwind classes aren't applying in dev and sometimes in production when login via credentials
I can give a link to my github repo if needed
13 replies
TTCTheo's Typesafe Cult
•Created by Teodorant, Tech-Priest on 5/14/2024 in #questions
Tailwind classes aren't applying in dev and sometimes in production when login via credentials
I don't add (js, jsx, md, mdx) files, i am using purely tsx files
13 replies
TTCTheo's Typesafe Cult
•Created by Teodorant, Tech-Priest on 5/14/2024 in #questions
Tailwind classes aren't applying in dev and sometimes in production when login via credentials
so I could have specific pages that have a top header
13 replies
TTCTheo's Typesafe Cult
•Created by Teodorant, Tech-Priest on 5/14/2024 in #questions
Tailwind classes aren't applying in dev and sometimes in production when login via credentials
the problems started after I started using a route group
13 replies
TTCTheo's Typesafe Cult
•Created by Teodorant, Tech-Priest on 5/14/2024 in #questions
Tailwind classes aren't applying in dev and sometimes in production when login via credentials
13 replies
TTCTheo's Typesafe Cult
•Created by Teodorant, Tech-Priest on 5/14/2024 in #questions
Tailwind classes aren't applying in dev and sometimes in production when login via credentials
13 replies
TTCTheo's Typesafe Cult
•Created by Teodorant, Tech-Priest on 5/14/2024 in #questions
Tailwind classes aren't applying in dev and sometimes in production when login via credentials
@michaeldrotar
13 replies
TTCTheo's Typesafe Cult
•Created by Teodorant, Tech-Priest on 5/14/2024 in #questions
Tailwind classes aren't applying in dev and sometimes in production when login via credentials
for context both of these are on the same route but one is in local dev and other on is live on vercel
13 replies
TTCTheo's Typesafe Cult
•Created by Teodorant, Tech-Priest on 2/6/2024 in #questions
How do I setup credentials based auth with the app I created with T3 CLI?
but it doesn't change the sign in button to sign out and I can' display the id on the screen
9 replies
TTCTheo's Typesafe Cult
•Created by Teodorant, Tech-Priest on 2/6/2024 in #questions
How do I setup credentials based auth with the app I created with T3 CLI?
I am using this code on a default t3 project, and when I enter in my credentials, it logs out good pass
9 replies
TTCTheo's Typesafe Cult
•Created by Teodorant, Tech-Priest on 2/6/2024 in #questions
How do I setup credentials based auth with the app I created with T3 CLI?
callbacks: {
async jwt({ token, user }: any) {
// console.log("jwt callback", { token, user, session });
if (user) {
token.role = user.role;
token.isClient = user.isClient;
token.isAdmin = user.isAdmin;
token.isRepairman = user.isRepairman;
token.sub = user.id;
}
return token;
},
async session({ session, token }: any) {
// console.log("sesh callback", { token, user, session });
if (session?.user) {
session.user.role = token.role;
session.user.isClient = token.isClient;
session.user.isAdmin = token.isAdmin;
session.user.isRepairman = token.isRepairman;
session.user.sub = token.sub;
}
return session;
},
},
};
9 replies
TTCTheo's Typesafe Cult
•Created by Teodorant, Tech-Priest on 2/6/2024 in #questions
How do I setup credentials based auth with the app I created with T3 CLI?
import CredentialsProvider from "next-auth/providers/credentials";
import bcrypt from "bcrypt";
import prisma from "@/prisma/client";
export const authOptions = {
providers: [
CredentialsProvider({
name: "Credentials",
credentials: {
email: {
label: "email:",
type: "text",
placeholder: "your-email",
},
password: {
label: "password:",
type: "password",
placeholder: "your-password",
},
},
async authorize(credentials) {
try {
const foundUser = await prisma.user.findUnique({
where: { email: credentials!.email },
});
if (foundUser) {
console.log("User Exists");
console.log(foundUser);
const match = await bcrypt.compare(
credentials!.password,
foundUser.password
);
if (match) {
console.log("Good Pass");
foundUser.password = " ";
// foundUser["role"] = "Unverified Email";
return foundUser;
}
}
} catch (error) {
console.log(error);
}
return null;
},
}),
],
9 replies