If followed this Google documentation about verifying Google-Account-Tokens on the server side, but I am kinda confused.
GoogleIdTokenVerifier googleIdTokenVerifier = new GoogleIdTokenVerifier.Builder(new NetHttpTransport(), new JacksonFactory())
.setAudience(Collections.singletonList(CLIENT_ID))
.build();
In this piece of code I figured out that the transport
and jsonFactory
arguments can be filled as new NetHttpTransport()
and new JacksonFactory()
here. It also describes how to get AudienceString
, but I couldn't figure out what it is for. I couldn't test it, but my question is if I can use it without .setAudience()
or if I need it and what it is for.
In .setAudience()
you have to pass all client ID
's. You can get the ID
for your client from the Credentials Page. It's explained here.
Thanks to @StevenSoneff.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With