-
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.
Answered by
n-bravo
Jul 19, 2023
Replies: 1 comment 2 replies
-
The default oAuth strategy looks up the existing entity by |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: