auth icon indicating copy to clipboard operation
auth copied to clipboard

Not able to login using supabase + google login sdk in iOS app

Open ashislaha opened this issue 6 months ago • 3 comments

Bug report

see this issue still exists today with GoogleSignIn flow and Supabase

I just configure

import GoogleSignIn
...
GIDSignIn.sharedInstance.configuration = GIDConfiguration(clientID: clientId)

await GIDSignIn.sharedInstance.signIn(withPresenting: presentingViewController)

Once I receive id_token and accessToken, try to hit supabase

await supabase.auth.signInWithIdToken(
                credentials: OpenIDConnectCredentials(
                    provider: .google,
                    idToken: idToken,
                    accessToken: accessToken
                )

But I am seeing this error

Supabase authentication failed: api(message: "Passed nonce and nonce in id_token should either both exist or not.", errorCode: Auth.ErrorCode(rawValue: "unknown"), underlyingData: 117 bytes, underlyingResponse: <NSHTTPURLResponse: 0x12dd38b80> { URL: [https://nrmvznqrahftxodgrygq.supabase.co/auth/v1/token?grant_type=id_token](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html) }

I configured correctly both google cloud and supabase authentication. Not sure why?

ashislaha avatar Jul 06 '25 19:07 ashislaha