supabase / auth

A JWT based API for managing users and issuing JWT tokens
https://supabase.com/docs/guides/auth
MIT License
1.55k stars 375 forks source link

Incorrect nonce check for google - sign in with id token #1829

Open Lxstr opened 3 weeks ago

Lxstr commented 3 weeks ago

Bug report

Describe the bug

IdToken returned by google does not contain a hashed nonce but currently, gotrue hashes the nonce in the request and checks if it matches the nonce in the id token payload.

Therefore it is impossible to get a successful nonce check. This have been confirmed against google package which returns a success nonce check:

https://google-auth.readthedocs.io/en/master/reference/google.oauth2.id_token.html

This has also been previously mentioned here https://github.com/supabase/auth/issues/412