vercel / ai-chatbot

A full-featured, hackable Next.js AI chatbot built by Vercel
https://chat.vercel.ai
Other
5.61k stars 1.67k forks source link

Authentication Not working (Probably a me issue) #267

Closed Godrules500 closed 4 months ago

Godrules500 commented 4 months ago

Hello, in your previous version I had replaced the github provider with

export const { handlers: { GET, POST }, auth } = NextAuth({ providers: [ Okta({ clientId: process.env.OKTA_CLIENT_ID, clientSecret: process.env.OKTA_CLIENT_SECRET, issuer: process.env.OKTA_CLIENT_ISSUER, checks: ['pkce', 'state'], authorization: { params: { scope: 'openid email profile offline_access' } } }) ],

After using the new changes, it errors and sends me to http://localhost:3000/api/auth/error which I know api/ was removed. But how can I get it to function as when logging in with basic auth like y'all have in the latest version?

Godrules500 commented 4 months ago

Nevermind, I got it. I had to put back the api/auth (maybe there's a better way) and it started working. I've got about about a week or 2 of nextjs and react knowledge now, these new and needed changes are throwing me for a loop lol.

jeremyphilemon commented 4 months ago

@Godrules500

No worries, glad you were able to figure it out! Feel free to open an issue if you have any questions :)