Swiichy
Swiichy
TTCTheo's Typesafe Cult
Created by Swiichy on 2/17/2024 in #questions
Retrieving the GitHub username from the session object.
I don't use TRPC, is there a way to do this without? https://github.com/SwiichyCode/GitShareSpace/blob/main/src/server/auth.ts
4 replies
TTCTheo's Typesafe Cult
Created by Swiichy on 2/7/2024 in #questions
T3-next-auth-prisma with credential and oauth
Ty dude !
5 replies
TTCTheo's Typesafe Cult
Created by chris on 1/26/2024 in #questions
How to implement Role Based Authorization in T3?
You use oauth provider ?
9 replies
TTCTheo's Typesafe Cult
Created by chris on 1/26/2024 in #questions
How to implement Role Based Authorization in T3?
role: session.user.role, => role: user.role,
9 replies
TTCTheo's Typesafe Cult
Created by chris on 1/26/2024 in #questions
How to implement Role Based Authorization in T3?
export const authOptions: NextAuthOptions = {
callbacks: {
session: ({ session, user }) => ({
...session,
user: {
...session.user,
id: user.id,
role: user.role,
},
}),

redirect: ({ baseUrl }) => {
return Promise.resolve(`${baseUrl}/shop`);
},
},
export const authOptions: NextAuthOptions = {
callbacks: {
session: ({ session, user }) => ({
...session,
user: {
...session.user,
id: user.id,
role: user.role,
},
}),

redirect: ({ baseUrl }) => {
return Promise.resolve(`${baseUrl}/shop`);
},
},
9 replies
TTCTheo's Typesafe Cult
Created by Michael on 1/20/2024 in #questions
Next auth with role based access control and credentials provider
I am also looking for a repository that covers the proper implementation of credentials. If you find one, let me know.
4 replies