Hello Apigee Community,
I have been following the videos of @dchiesa1 regarding the verification of JWT tokens (https://www.youtube.com/watch?v=Ijm7iyDOVFY) using the id_token coming from the google auth endpoint https://accounts.google.com/o/oauth2/v2/auth.
I pass in the ‘id_token’ in the authorization header, I use a Service Callout to get the public keys from Google’s public keys /oauth2/v3/certs , then Verify the JWT using the keys from google.
I have created and OAuth 2.0 Client in the API & Services and had configured the user type as “Internal” in the OAuth Consent Screen so I have figured only gmail accounts with hd of “company.com” will only get accepted as valid JWT. My problem is that it is accepting any ‘id_token’ from Any Google accounts including my personal Gmail (which I do not want). I have placed my app to ‘External’ and added some users to test in the meantime.
My question is that how can I restrict my authenticated users on those who are only registered users? Am I missing anything in my configuration?
Q2. How does my OAuth 2.0 Client that I created fit in Apigee when the only time I used it is when trying to retrieve a JWT token. I have created the client myself and set the my scope to openid, email and profile myself so I understand that my email shows in the JWT token but what if there is another developer? Do we have to share the same Client Id? How do I let Apigee know what I am using this OAuth client from APIs & Services?
Thank you for reading my woes and I appreciate all of your insight regarding this issue. Also I apologize if I get some terms wrong.

