dissorial / doc-chatbot

Document chatbot — multiple files, topics, chat windows and chat history. Powered by GPT.
813 stars 137 forks source link

Web app authentication issues #32

Closed jasmeetchadha closed 1 year ago

jasmeetchadha commented 1 year ago

Hi Dissorial

thanks for all the work. I am now trying to run the app on vercel.

I copied from your git Changed the env file with api secrets I was using on desktop Changed url to webapp url

I am getting an authentication error. Not sure why? I am using the next auth secret that I generated on desktop. Could this be? How would I generate next auth secret I’m vercel?

I have added the user in Google api console but it says access denied.

Any idea what might be causing this?

IMG_0623

jasmeetchadha commented 1 year ago

IMG_0624

hjhaooo commented 1 year ago

Go to your google cloud console and set the allowance of your custom domain. APIs and Services -> Credentials -> OAuth 2.0 Client IDs -> edit OAuth client -> Authorized JavaScript origins and Authorized redirect URIs

jasmeetchadha commented 1 year ago

Those were set already

JS origins https://xxxxxx.vercel.app

Authorised redirect https://xxxx.vercel.app/api/auth/callback/google

jasmeetchadha commented 1 year ago

Thats sorted now. I had to promote deployment to production so the correct URL's are active.

Now after login using the profile I was prev using from local 1) I dont see past namespaces 2) When uploading new document, it doesnt ingest. I get an error: Unexpected token 'A', "An error o"... is not valid JSON