Camunda SSO by ouath2 and openid

Hello I’d like to implement custom authentication for my Camunda application, through Identity Provider like Google’s API.
Authentication itself should be going through Google’s OpenID Connect, but all other information about the user and their roles/permissions would be kept in Camunda’s database.

So the login process would look like this:

  1. if new user tries to log in, after they authenticate their gmail account, user information would be created for them in Camunda’s database, default roles and matching username/email
  2. if an existing user tries to log in, authentication would still go through Google, and if successful, they would be logged in as the matching user from Camunda’s database.

I currently have one Spring application whit embeded Camunda engin and i dont know how do this? .