wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.

Home Page:https://wasp-lang.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make sure we log OAuth errors in the server console

infomiho opened this issue · comments

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:

export function handleOAuthErrorAndGetRedirectUri(error: unknown): URL {

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.

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