wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
12.76k stars 1.14k forks source link

Make sure we log OAuth errors in the server console #2026

Closed infomiho closed 1 month ago

infomiho commented 1 month ago

Sometimes users report seeing "An unknown error occurred while trying to log in with the OAuth provider." when things go wrong with the OAuth flow.

This message is sent when something unexpected happens and we don't want to be more specific than this when showing an error on the client: https://github.com/wasp-lang/wasp/blob/31161d131e81bad36859f0f6a2d0f7d701748747/waspc/data/Generator/templates/server/src/auth/providers/oauth/user.ts#L31

But, this makes it hard to debug for us and for the users. When we redirect with the generic error message, we should also log with console.error on the server.

ksk385 commented 1 month ago

Would this be as simple as passing the unknown error to the callback as a string?