Open nikolaischunk opened 11 months ago
The whole repository serves as a great starting point for creating a dashboard in combination with a bot. Since this repo serves as a template, it would awesome if the implementation of the auth would be correctly typesafed.
This File
NextAuth provides a way to augment the different interfaced, that are used, like Session.
Session
https://next-auth.js.org/getting-started/typescript#module-augmentation
I used this to augment the session user field, but am stuck, when it comes to the profile, jwt etc types
https://github.com/BirthdayyBot/dashboard/blob/develop/src/lib/types/next-auth.d.ts https://github.com/BirthdayyBot/dashboard/blob/develop/src/lib/options/auth.ts
If this is successful, it would be something that never has been documented (afaik), so pretty useful.
https://github.com/nextauthjs/next-auth/discussions/3774 https://github.com/analog-org/analog-tsx/blob/master/apps/dashboard/src/pages/api/auth/%5B...nextauth%5D.ts https://authjs.dev/getting-started/typescript https://next-auth.js.org/configuration/callbacks#session-callback https://github.com/nextauthjs/next-auth/issues/614
Sorry for taking forever, I was in Kenya when you submitted this. I am also facing this dilemma with the profile types
Topic
The whole repository serves as a great starting point for creating a dashboard in combination with a bot. Since this repo serves as a template, it would awesome if the implementation of the auth would be correctly typesafed.
This File
NextAuth provides a way to augment the different interfaced, that are used, like
Session
.Own Implementation
I used this to augment the session user field, but am stuck, when it comes to the profile, jwt etc types
If this is successful, it would be something that never has been documented (afaik), so pretty useful.
Related Links