OAuth2 Authentication flow error

update should only be called once the user record exists. The front-end should call a create route when id is undefined.