#Next-Auth
1 messages ยท Page 1 of 1 (latest)
Hi @ionic pumice. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Good idea
Sorry @ionic pumice, I seem to be having a bit of trouble. Don't worry though, I've pinged my supprt and they will try to fix me up! :technologist:
Perhaps try again in 15mins?
we will see in a bit ๐
uhm keep it as NEXTAUTH_URL, I believe it is mandatory
and dont forget to restart the app after making changes in the env file
ok - restarting
browser decieded to just hang/crash
Ok response after hitting sign-in,
awesome, so the env was the issue.
I was able to get that response without the env
Oh, so are you still getting the url error?
BUT no error on the url popping up lol
however my session when I try and log it out is null
have you set up the callbacks for nextauth?
can you take a screenshot of the whole code in authOptions
session.id and session.tags does not exist
its session.user.id
do you have the types set up for User and Session?
No types setup yet
Usually you should set up the types beforehand, to not get stuck on errors like this one
thats the whole point of typescript right
I agree, but I'm not getting any errors right now, I just am stuck trying to figure out how to get it to A: redirect to my protected route( Maybe manually redirect after 200 response.) but B: trying to get the session to actually save so I can look it up.
After I hit submit I get my 200 response, then manually navigate to the protected route to see if its able to find a session and its always null
Wait, are you setting the callback for the redirect anywhere in callback: {}?
i cant see it
No I havn't set it in the callback. I also discovered I cant make my auth fail. It always gives me 200 even if I return null
in the callback all I do is return the jwt token and the session in the authOptions
return "/";
},```
This should be at the end of the callback and you return whatever path you want when the user logs in
THe only other thing I can think of is I'm not wrapping anything in the SessionProvider since I don't have an _app.js anymore
Do you want the sign in to be with only using email?
yea only email
I think credentials are for using username and password
email only is something else
I mean I still should be able to return null and get an error though from my authorize function
Also in the docs the provider is called CredentialsProvider not Credentials
If you are going for email only might as well do it with Google for example because its so much easier, and implement email only later on
So the whole reason I only want email, is cus I check their email to see if they are on my email list to get access to my library of free downloads. They have to sign up to get access. So thats why I'm only checking the email. I ping convertkits api and make sure they are an active subscriber, and then I log them in
But right now I can't even return null to get the fetch request to fail when trying to use the Signin function on my custom login page
Either way man i super appreciate the help, I'll keep messing around and see if I can get it to work. I may just go back to plain oldschool cookies at this point
thank you @noble knoll @hazy roost @wide zephyr for the help today. I'm a littler further than I was!
hmmm sry I was off for a bit. How do you check that someone simply spoofs having signed up by using an email? I mean still have to get some users email, but thats not impossible. just 5 cts from my side ๐
Email is a double opt in
if you know someones email - sure you could log in but its not like its a paid thing
its just a fancy email list builder at the end of the day
ok. just out of curiousity. What do you use for the email list? Have you heard of Mailtrain? ๐
I use convertkit
service or open source solution?
its a service - convertkit.com
@hazy roost - any clues to this issue:
happened after I tried to login using credentials
I guess its because credentials type expects a password.
you woudl have to write your own credentials type. Hang on I get the docs page for the use case.
Seems like its saying it doesnt like one of my callback functions no?
yeah and it does, since you have a custom structure for the login & user.
I have different additional fields on the user / session object, and hence had to do the same.
NextAuth.js has its own type definitions to use in your TypeScript projects safely. Even if you don't use TypeScript, IDEs like VSCode will pick this up to provide you with a better developer experience. While you are typing, you will get suggestions about what certain objects/functions look like, and sometimes links to documentation, examples, ...
that is for extending though, so you might have to do something else.
NextAuth.js provides a set of models and schemas for the built-in TypeORM adapter that you can easily extend.
I also noticed its sending me from http to https
ui for this I dont know, since I do development and staging on fully fledged fqdn with tls termination...
ask @finite wharf
Let me check the knowledge base for you. One moment! :books:
Hmm, I don't know enough to give you a confident answer yet. Please provide a specific question about Next.js, and I'll do my best to help you using the information extracts provided.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
lets see ๐ค
@hazy roost kapa.ai is still learning and improving, please let us how it did by reacting below
@finite wharf so you cannot answer questions on next-auth?
Let me check the knowledge base for you. One moment! :books:
I can certainly help you with questions related to NextAuth, as long as the information is available in the provided extracts. NextAuth is a full-featured authentication system for Next.js applications. It supports built-in providers like Google, Facebook, and GitHub, as well as JWT, JWE, email/password, and magic links. You can find an example of a Next.js project using NextAuth here (https://github.com/nextauthjs/next-auth-example).
If you have a specific question about NextAuth, please feel free to ask, and I'll do my best to help you using the information extracts provided.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@hazy roost kapa.ai is still learning and improving, please let us how it did by reacting below
its not. But OpenAI is just overloaded and have bigger fish to fry.
you can do that with kapa.ai as well as build it out yourself with Embeddings! Actually I am buidling a framework, that is generally not for that use case, but would be able to as well ๐
# StuddyBuddy - TeachersPet
Creating real knowledge, with artificial intelligence!
... Learning and teaching in the 21st century
... a breakthrough AI-powered education platform that provides personalised learning experiences, exam preparation and interactive source of knowledge for high school, undergraduate, graduate and research students. The semi-autonomous AI continuously improves the tailored learning experience as well as the sustainable knowledge transfer through every user interaction. At the same time, teachers are supported in the creation of learning & examination materials as well as the implementation of various examination formats, thus catapulting them into new spheres of teaching. The integration into learning platforms also makes the solution accessible to a large number of user groups from the most diverse areas. Rounded off with an intuitive user interface and an adaptable learning environment, StudyBuddy thus becomes an indispensable companion on the path of lifelong learning.
StudyBuddy aims to revolutionise education in the 21st century through the use of artificial intelligence to create personalised learning experiences for students, postgraduates and academics of all ages while taking their individual learning levels and types into account. The innovative platform solves pain points in education by providing customised educational materials and exam preparation textually, auditorily as well as visually in interactive formats using self-learning artificial intelligence, especially large language models (LLM). It can easily explain content, its context and transdisciplinary connections in language suitable for the learner, illustrate it with appropriate examples and simulate and conduct different formats of knowledge evaluation - written and oral.
The integrated TeachersPet feature enables educational institutions and teachers to efficiently create individual learning and examination materials and to carry out evaluations in an assisted or automated way. At the same time, the authorship of final papers & assignments can be systematically checked and ensured through integrated feedback functions for the respective examining body.
A key aspect of StudyBuddy - TeachersPet is its integration with learning platforms (LMS - Learning Management Systems). This seamless integration facilitates the exchange of course content, learning progress data and communication between the two systems, enhancing the individual learning experience while helping the artificial intelligence to autonomously self-improve. By integrating StudyBuddy - TeachersPet into existing learning platforms, educational institutions and teachers can benefit from the system's advanced AI capabilities and provide students with tailored learning materials and exercises to improve their skills and ensure sustainable success.
Dang man that sounds bad ass
thx for the flowers and its just the first page of the whitepaper. Got all parts ready and the fist MVP about 90% ready. Going round attracting talent, academic backing, clients and investors atm...
On that matter whats your work situation atm? ๐
LOL - I wish I could help. I full time working on a new site
haha freelancing or working employed?
I appreciate you having a real foto btw. All this discord stuff with avatars, emojis and stickers always feels kinda silly to me ๐
ok emojis is fine ๐
Working - my wife and I run our own business and I do all the web integrations for the site. I'm currently working on moving it over to a headless setup to increase speed, seo, dev speed, all that good stuff. I've been building one with remix and one with next.js but these new additions with next.js is where I think I want to go
Yea everyone loves a good emoji
interesting. Did that with my ex girlfriend / baby mother and her business! What headless CMS are you opting for? I did Wordpress since she and other people where familiar with it, but actually think it was not the best choice!
Yea using wordpress too atm. We have a ton of data so I can't just pick up and move DB's easily
what business are you in? and got a website? ๐
https://next-boss.eu
Thats my project / portfolio website. Has a basic chatbot on my portfolio included ๐
Yea its the old one right now, the new one is an all new design ๐
https://every-tuesday.com
So if you are interested in having a sales, service & support chatbot for your company, that basically hooks up on your existing database, you guys can always hit me up ๐
Automatic Yoast SEO with GPT could be an intersting thing as well. I wonder if there are already wp-plugins for that...
Nice man looks like you have next-auth working LOL
took some effort with ldap integration in the backend, and there are still some quirks... But dont find the time to work on the page atm...
have you played around with all the image generation AIs from Dall-E 2 to Stable Diffusion?
true that was this one too...
@hazy roost - shocker. I setup the Next.js demo example for next-auth, plugin my code - everything works lol

haha way to go! ๐