-
Hello Everyone, Currently I'm adding Google OAuth to an application with Featherjs 4.5 following the official docs and everything works smoothly with a new user with no existing email on the database. But for a existing user with null googleId, the OAuth throws Validation Error, refusing to patch the user by just adding the missing fields (like googleId and profilePicture). Is there a way to allow this patch behavior with the Custom OAuthStrategy? Thank you in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The default oAuth strategy looks up the existing entity by |
Beta Was this translation helpful? Give feedback.
Hello @daffl ,
I managed to solve this issue by patching the googleId of the existing user in a beforeHook of the authentication service.
The hook looks likes this: