Maybe you can try adapting the OpenID plugin code from https://github.com/jogetoss/openid-connect-authentication.
¡Gracias! Voy a intentarlo.