#Next-Auth

1 messages ยท Page 1 of 1 (latest)

ionic pumice
finite wharfBOT
#

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:

ionic pumice
#

Good idea

finite wharfBOT
#

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?

wide zephyr
#

You do have ur nextauth url set

#

right

hazy roost
#

we will see in a bit ๐Ÿ˜‰

ionic pumice
noble knoll
#

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

ionic pumice
#

ok - restarting

#

browser decieded to just hang/crash

#

Ok response after hitting sign-in,

noble knoll
#

awesome, so the env was the issue.

ionic pumice
#

I was able to get that response without the env

noble knoll
#

Oh, so are you still getting the url error?

ionic pumice
#

BUT no error on the url popping up lol

#

however my session when I try and log it out is null

noble knoll
#

have you set up the callbacks for nextauth?

#

can you take a screenshot of the whole code in authOptions

ionic pumice
#

out of order sorry

#

authorize fn:

noble knoll
#

do you have the types set up for User and Session?

ionic pumice
#

No types setup yet

noble knoll
#

Usually you should set up the types beforehand, to not get stuck on errors like this one

#

thats the whole point of typescript right

ionic pumice
#

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

noble knoll
#

Wait, are you setting the callback for the redirect anywhere in callback: {}?

#

i cant see it

ionic pumice
#

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

noble knoll
#
      return "/";
  },```
This should be at the end of the callback and you return whatever path you want when the user logs in
ionic pumice
#

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

noble knoll
#

Do you want the sign in to be with only using email?

ionic pumice
#

yea only email

noble knoll
#

I think credentials are for using username and password

#

email only is something else

ionic pumice
#

I mean I still should be able to return null and get an error though from my authorize function

noble knoll
#

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

ionic pumice
#

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!

hazy roost
#

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 ๐Ÿ˜„

ionic pumice
#

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

hazy roost
#

ok. just out of curiousity. What do you use for the email list? Have you heard of Mailtrain? ๐Ÿ˜‰

hazy roost
#

service or open source solution?

ionic pumice
ionic pumice
#

@hazy roost - any clues to this issue:

#

happened after I tried to login using credentials

hazy roost
#

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.

ionic pumice
#

Seems like its saying it doesnt like one of my callback functions no?

hazy roost
#

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.

#

that is for extending though, so you might have to do something else.

ionic pumice
#

I also noticed its sending me from http to https

hazy roost
#

ui for this I dont know, since I do development and staging on fully fledged fqdn with tls termination...

#

ask @finite wharf

finite wharfBOT
#

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:

hazy roost
#

lets see ๐Ÿค“

finite wharfBOT
#

@hazy roost kapa.ai is still learning and improving, please let us how it did by reacting below

hazy roost
#

@finite wharf so you cannot answer questions on next-auth?

finite wharfBOT
#

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

ionic pumice
#

lol

#

Time to break out chat gpt too

#

I dont understand why this is so hard lol

hazy roost
#

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.

ionic pumice
#

Dang man that sounds bad ass

hazy roost
#

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? ๐Ÿ˜„

ionic pumice
#

LOL - I wish I could help. I full time working on a new site

hazy roost
#

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 ๐Ÿ˜‰

ionic pumice
#

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

hazy roost
#

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!

ionic pumice
#

Yea using wordpress too atm. We have a ton of data so I can't just pick up and move DB's easily

hazy roost
#

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 ๐Ÿ˜‰

ionic pumice
hazy roost
#

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...

ionic pumice
#

Nice man looks like you have next-auth working LOL

hazy roost
#

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?

ionic pumice
#

Yea - the image journey one is incredible

#

err MidJourny

hazy roost
#

true that was this one too...

ionic pumice
#

@hazy roost - shocker. I setup the Next.js demo example for next-auth, plugin my code - everything works lol lolsob mind_blow_astonished

hazy roost
#

haha way to go! ๐Ÿ––