I followed the official document for implementing sing-in with Google. It was not difficult, but the official document stopped at getting the basic information such as name or e-mail. I need to get birthday.
So, when creating the option, I added this:
.requestScopes(Scope("https://www.googleapis.com/auth/user.birthday.read"))
Since the official document stopped there I could not get how to get birthday. So I have searched the web and found a method using a plain HTTP GET request to https://people.googleapis.com/v1/people/me. (Or is this covered by the Google Play Services API?)
But the method needs the access token, which was not included in the GoogleSignInAccount which was returned after signing in. There was an example for getting the access ID by creating an OAuth server ID and then use getServerAuthCode() to get the access token, but that is complicated and it is not done on a server, it is done inside the app, right after singing in.
In this case, do I have to create an OAuth server ID, and use the access token to get the birthday?