W
Wasp4mo ago
csbk

Using Opensaas, trying to get Google Auth working but it's giving me a new error.

The error: 'Save failed: user with the same identity already exists'. I have had this working before so not sure what's happened. I have followed instructions and documentation to the letter fro mscratch to try and fix - no joy so far.
3 Replies
kapa.ai
kapa.ai4mo ago
Hi @csbk. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- The error message "Save failed: user with the same identity already exists" typically means that you are trying to sign up or log in with a Google account whose email is already associated with an existing user in your database, possibly via a different authentication method (like email/password). Wasp (and OpenSaas) currently does not support merging multiple auth identities (e.g., Google and email/password) for a single user account. This is a known limitation and is mentioned in the documentation: "Wasp currently doesn't support multiple auth identities for a single user. This means, for example, that a user can't have both an email-based auth identity and a Google-based auth identity" [Auth Entities Example]. How to resolve: - You need to ensure that the user does not already exist in your database with the same email via another auth method. If you are testing, you can use wasp db studio to inspect and delete the conflicting user record, then try logging in again [Discord Oauth troubleshooting]. - If you want to allow users to log in with both Google and email/password using the same email, this is not currently supported until the account merging feature is implemented. Summary:
This error is expected behavior given the current limitations. The only workaround is to remove the existing user with the same email or use a different email for Google Auth. If you need account merging, you will need to wait for future Wasp updates [Auth Entities Example]. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @csbk, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
csbk
csbkOP4mo ago
Thank you - this is solved. I did not realise Prisma DB Studio wouldn't allow me to delete a user until after I removed the user's admin privilidges.
MEE6
MEE64mo ago
Wohooo @csbk, you just became a Waspeteer level 2!

Did you find this page helpful?