Using Plugin to modify the user group but reload when user connect

I write a script to modify the user groups and enable the google sso group mode. I want to create a custom groups for user and vpn server. However, when I connect to VPN via pritunl, the user’s group will be erase and renew for user’s google group. Is there any suggestion to prevent this or I can override the sso authentication ?

The sso_authenticate plugin handler can return user groups. These groups are merged with the groups provided by the single sign-on provider.