Closed lovelyrrg51 closed 1 year ago
@lovelyrrg51 Good timing, I just ran into this too. You'll need to declare the scopes you need if you want more than the user's email, ex:
google.New(clientId, clientSecret, callbackUrl, "https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.profile")
With https://www.googleapis.com/auth/userinfo.profile
added you should get the user's name.
It's working. Thanks, @mortenson
Hey Guys. With google oauth on goth, could not get name. Please let me know how to handle it. Thanks.
Init Store & Goth Provider
Google Provider
===== User Info: ===== {map[email:dragonwarrior920619@gmail.com id:110134761728427896598 picture:https://lh3.googleusercontent.com/a/default-user=s96-c verified_email:true] google dragonwarrior920619@gmail.com 110134761728427896598 https://lh3.googleusercontent.com/a/default-user=s96-c ya29.a0AWY7CkkiYDJENCioWNhKwwtuauYKBmBrC-y8Zx-tT5w5RyjeKOPT1DUrsKaj9kwxiCw72UsW2lAvqZDD9vSoSv5jXIBeTxTJYLBg774RKQ0LdorWR8nxDiAfFbFl8t-0165 2023-06-19 03:17:40.763992897 -0600 MDT m=+3609.651427661 4OTY1OTgiLCJlbWFpbCI6ImRyYWdvbndhcnJpb3I5MjA2MTlAZ21haWwuY29tIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImF0X2hhc2giOiJkQXFQaFcyNkVkOFNqN3k1VTdpX2NnIiwiaWF0IjoxNjg3MTYyNjYxLCJleHAiOjE2ODcxNjYyNjF9.eG9cltTYZiVsUImEA456WTkTN4jGDjxQjqtJGfu0Uv-VhMbyD3zxcxtlVtW8wXBBHfKCTcQ1zY4r407_zvVawAIkbIqM_CgNu1jV0eiaXJ0Zlr8Cy1AqFlDWmoh2omcGSqysQAYODlrHKb6l2onQdpE9upro-xwNi9nUw4pEfHzqj-bTr4ohWMcMvB-hJ01HqCRYd62thebIdPUAIQpMeig1HBaBPhsqHFQ-Z7javRnZvXJRaegUXHSEYQngwz5jHrN7Jflf9nMQmcMYH7_r51oB0q9w} ====================== User Email: dragonwarrior920619@gmail.com ====================== User Name:
====================== User IDToken: hhc2giOiJkQXFQaFcyNWTkTN4jGDjxQjqtJGfu0Uv-VhMbyD3zxcxtlVtW8wQsVLnBFWC3LybLGWzSLbSs5E3d-EOvxY_a_2iF4hBSXkSSIMyNVz7GLdn-XBBHfKCTcQ1zY4r407_zvVawAIkbIqM_CgNu1jV0eiaXJ0Zlr8Cy1AqFlDWmoh2omcGSqysQAYODlrHKb6l2onQdpE9upro-xwNi9nUw4pEfHzqj-bTr4ohWMcMvB-hJ01HqCRYd62thebIdPUAIQpMeig1HBaBPhsqHFQ-Z7javRnZvXJRaegUXHSEYQngwz5jHrN7Jflf9nMQmcMYH7_r51oB0q9w ====================== User AccessToken: oSv5jXIBeTxTJYLBg774RKQ0LdorWR8nxDiAfFbFl8t-j3Twy6i5ALVzGUSiiq8BEGPqGydlERwaCgYKAc4SARESFQG1tDrpcoJ3FUT8QYTSLuO0jTsVhg0165 [GIN] 2023/06/19 - 02:17:42 | 200 | 1.043941956s | ::1 | GET "/v1/auth/google/redirect?state=WinyuIa9p8JidoAeZjvRFnCYNYgq-Uj5EB3bYlVLaPOm31eI2Mkf2tpH8e9M7Jfg1nHhNyeddgNHc9wLTO2e0Q%3D%3D&code=4%2F0AbUR2VN3-lCVKbsZYmNM-CZbg5cymbXWuH2wVv4ddc1lr9Ynocmv_7dJ_jpAo7wB2NVLJQ&scope=email+openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&authuser=0&prompt=none"