fixed an issue with the oauth authorization snippet, it was using the user database id to update the token and not the id of the trait