I have cloned repo from makerkit and trying to implement Google OAuth using supabase as email authentication method is also handled by supabase and it is the primary database I am using.
I have spent a lot of time figuring this out, but could not find any solution.
What I found on supabase website is just a description.
bad_oauth_state: OAuth state (data echoed back by the OAuth provider to Supabase Auth) is not in the correct format. Indicates an issue with the OAuth provider integration.
I checked the state query from redirect url, it had JWT token as value.
state=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjM2MDQ2MTMsInNpdGVfdXJsIjoiaHR0cDovL2xvY2FsaG9zdDozMDAwIiwiaWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJmdW5jdGlvbl9ob29rcyI6bnVsbCwicHJvdmlkZXIiOiJnb29nbGUiLCJyZWZlcnJlciI6Imh0dHA6Ly9sb2NhbGhvc3Q6MzAwMC9hdXRoL2NhbGxiYWNrPyIsImZsb3dfc3RhdGVfaWQiOiJmZjcwNzg1NS1lZmUzLTQ4MzktODg3Mi05ODE4YzNlNWI2MGIifQ.qc-MuQbymZKHOkkFCmxmGcluF7pFn33Uw_SNHI9Z898
The redirect url that I got from Supabase is https://vucydfrcoxfqdzyyhzyg.supabase.co/auth/v1/callback. I have added this to the Google OAuth settings.
I have configured the config.toml file under src directory, adding redirect uri, client_id, and secret.
I do not know if there is something else needed to be configured. This is my first time interacting with NextJS, supabase and typescript. Have very less understanding of most of the things, so do not know what code I can provide here as help.
MakerKit