I have configured OAuth2 service in Moodle and after a success login from OAuth2, it redirects me to edit user profile page for new user and only email is prefilled as the OAuth2 issuer only provides openid and mail scopes, I couldn't directly retrieve user profile from the callback and prefill First Name, Last Name and other user info fields. So, how should I configure it in Moodle website or in the backend code to call
https://{oauthurl}/oauth/v1/token
in order to get the access token and after that retrieve user info by calling
https://{oauthurl}/oauth/v1/userinfo
?