Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled Runtime Error - Unauthorized #68

Closed
fotoflo opened this issue Jun 21, 2023 · 7 comments
Closed

Unhandled Runtime Error - Unauthorized #68

fotoflo opened this issue Jun 21, 2023 · 7 comments

Comments

@fotoflo
Copy link

fotoflo commented Jun 21, 2023

Your documentation tells us how to configure it but we don't have a url for the github oauth callback.

Somehow it seems to work unauthorized when deployed, but login doesnt work on either local or deployed version.

Unhandled Runtime Error
Error: Unauthorized

Call Stack
eval
node_modules/.pnpm/ai@2.1.2_react@18.2.0_svelte@3.59.1_vue@3.3.4/node_modules/ai/react/dist/index.mjs (120:0)
Generator.next

fulfilled
node_modules/.pnpm/ai@2.1.2_react@18.2.0_svelte@3.59.1_vue@3.3.4/node_modules/ai/react/dist/index.mjs (22:0)

And on prod:
image

@balazsorban44
Copy link
Member

Callback URL: #28 (comment)

You are also likely missing a secret in prod, check the server logs as suggested on the image. (logs in the Vercel dashboard)

@balazsorban44
Copy link
Member

Also, this seems to be a duplicate report of #46, although neither has a sufficient reproduction attached. This should likely be closed in favor of #46 and a repro added there, if the above does not resolve your issue. 🙏

@fotoflo
Copy link
Author

fotoflo commented Jun 21, 2023

Hello, @balazsorban44 thansk for the response

i set the NEXTAUTH_URL="localhost:3000" in .env

no luck

@balazsorban44
Copy link
Member

balazsorban44 commented Jun 21, 2023

It's likely NEXTAUTH_SECRET that's missing. See the comments in https://github.com/vercel-labs/ai-chatbot/blob/main/.env.example

For further assistance, please provide a reproduction or more information about the server logs. 🙏

@jaredpalmer
Copy link
Collaborator

We now force login in all environments as well. This should be fixed. If you are seeing this error still please re-open.

@fotoflo
Copy link
Author

fotoflo commented Jun 26, 2023

Hi I saw you closed this issure without updating the documentation on how to create a secret...

@prasad123-hub
Copy link

Hi .. Facing same issue ... Is there any updated documentation ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants