I'm getting the error [next-auth][error][SIGNIN_OAUTH_ERROR] . When I looked it up on the Next-auth website, it stated this:
SIGNIN_OAUTH_ERROR
This error occurs during the redirection to the authorization URL of the OAuth provider. Possible causes:
1. Cookie handling Either PKCE code verifier or the generation of the CSRF token hash in the internal state failed.
If set, check your cookies configuration, and make sure the browser is not blocking/restricting cookies.
2. OAuth misconfiguration
Please check your OAuth provider and make sure your URLs and other options are correctly set.
If you are using an OAuth v1 provider, check your OAuth v1 provider settings, especially the OAuth token and OAuth token secret.
3. openid-client version mismatch
If you are seeing expected 200 OK with body but no body was returned, it might have happened due to openid-client (which is a dependency we rely on) node version mismatch. For instance, openid-client requires >=14.2.0 for lts/fermium and has similar limits for the other versions. For the full list of the compatible node versions please see package.json.
The second option seem to align the most to my problem, but I'm stuck.
This is the code: