How to check GoogleSignIn User has uploaded image or default image set by Google












1















Google User getting below type default image when user does not have uploaded his image.



enter image description here



GIDGoogleUser has GIDProfileData object which has "hasImage" boolean variable. It is always returns true.



Is there is any way we are able to know User has uploaded his profile picture or it is default set by Google through "GoogleSignIn" components.










share|improve this question



























    1















    Google User getting below type default image when user does not have uploaded his image.



    enter image description here



    GIDGoogleUser has GIDProfileData object which has "hasImage" boolean variable. It is always returns true.



    Is there is any way we are able to know User has uploaded his profile picture or it is default set by Google through "GoogleSignIn" components.










    share|improve this question

























      1












      1








      1








      Google User getting below type default image when user does not have uploaded his image.



      enter image description here



      GIDGoogleUser has GIDProfileData object which has "hasImage" boolean variable. It is always returns true.



      Is there is any way we are able to know User has uploaded his profile picture or it is default set by Google through "GoogleSignIn" components.










      share|improve this question














      Google User getting below type default image when user does not have uploaded his image.



      enter image description here



      GIDGoogleUser has GIDProfileData object which has "hasImage" boolean variable. It is always returns true.



      Is there is any way we are able to know User has uploaded his profile picture or it is default set by Google through "GoogleSignIn" components.







      ios objective-c iphone gmail google-signin






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 22 '18 at 6:25









      GauravGaurav

      184311




      184311
























          3 Answers
          3






          active

          oldest

          votes


















          0














          If he have not selected an image from withing your application. And there is an image that is being uploaded, then high chances are that it is an image provided by google. Just make sure to exempt place holder image when you are trying to upload.



          As for checking if google returned image is a image that user uploaded or google default, I checked with different path for both type of image and see no identifier that can segregate 2 type of images.






          share|improve this answer































            0














            As google is providing default profile pictures with the first letter of name it is quite difficult to identify if the profile picture is set by the user on google account or not. But if you want this any how then you can user OCR to identify if there is only one alphabet in the image retrieved from the google and that is same as the first letter of the Name of the user. Refer this link for OCR.



            SwiftOCR



            Thanks






            share|improve this answer































              0














              When you do a signin with google assuming that you requested one of the profile scopes (i think) You can make a request against the userinfo endpoint



              GET /oauth2/v2/userinfo HTTP/1.1
              Host: www.googleapis.com
              Content-length: 0
              Authorization: Bearer ya29.GltcBnVqN8CQ5VpTe0qVSwYomBDGkAGtUSzvYBGti_mFKfemFjIPOE00HCOkfqMXpKVS6qUeMKgnzj2uPrxgvmBeeX4b0pDur3ttfGANCWceotLBMqFO4I47b9


              This will return the public profile information that google has on the User.



              HTTP/1.1 200 OK
              Content-length: 313
              X-xss-protection: 1; mode=block
              Content-location: https://www.googleapis.com/oauth2/v2/userinfo
              X-content-type-options: nosniff
              Transfer-encoding: chunked
              Expires: Mon, 01 Jan 1990 00:00:00 GMT
              Vary: Origin, X-Origin, Referer
              Server: ESF
              -content-encoding: gzip
              Pragma: no-cache
              Cache-control: no-cache, no-store, max-age=0, must-revalidate
              Date: Thu, 22 Nov 2018 07:06:47 GMT
              X-frame-options: SAMEORIGIN
              Alt-svc: quic=":443"; ma=2592000; v="44,43,39,35"
              Content-type: application/json; charset=UTF-8
              {
              "picture": "https://lh5.googleusercontent.com/-a1CWlFnA5xE/AAAAAAAAAAI/AAAAAAAAl1I/UcwPajZOuN4/photo.jpg",
              "name": "Linda Lawton",
              "family_name": "Lawton",
              "locale": "en",
              "gender": "female",
              "link": "https://plus.google.com/+LindaLawton",
              "given_name": "Linda",
              "id": "117200475532672775346"
              }


              As you can see it is returning my picture. This is the picture that i beleave i have uploaded to my Google+ account. As google is discontinuing Google+ i suspect these have all been exported over to the users Google account and there must be a way to upload a picture from their.



              Now If I make a request against an account where i have not uploaded an image I get



              HTTP/1.1 200 OK
              Content-length: 326
              X-xss-protection: 1; mode=block
              Content-location: https://www.googleapis.com/oauth2/v2/userinfo
              X-content-type-options: nosniff
              Transfer-encoding: chunked
              Expires: Mon, 01 Jan 1990 00:00:00 GMT
              Vary: Origin, X-Origin, Referer
              Server: ESF
              -content-encoding: gzip
              Pragma: no-cache
              Cache-control: no-cache, no-store, max-age=0, must-revalidate
              Date: Thu, 22 Nov 2018 07:11:24 GMT
              X-frame-options: SAMEORIGIN
              Alt-svc: quic=":443"; ma=2592000; v="44,43,39,35"
              Content-type: application/json; charset=UTF-8
              {
              "picture": "https://lh5.googleusercontent.com/-GTTySn-WtmA/AAAAAAAAAAI/AAAAAAAAAAA/AGDgw-imFDZsZC-MaGnPIHPnh2Z95O-cSA/mo/photo.jpg",
              "name": "Linda Lawton",
              "family_name": "Lawton",
              "locale": "da",
              "link": "https://plus.google.com/108097091072786400385",
              "given_name": "Linda",
              "id": "108097091072786400385"
              }


              Which is



              enter image description here



              So even if the user has not personally uploaded an image Google creates a dummy one for them out of the first letter of their first or last name. There is no way for you to know if its a dummy image or an actual image unless you create some kind of image recognition system for detecting the dummy images.



              Note: All of this was tested using oauthplayground data will be the same in IOs responses as well.






              share|improve this answer























                Your Answer






                StackExchange.ifUsing("editor", function () {
                StackExchange.using("externalEditor", function () {
                StackExchange.using("snippets", function () {
                StackExchange.snippets.init();
                });
                });
                }, "code-snippets");

                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "1"
                };
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function() {
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled) {
                StackExchange.using("snippets", function() {
                createEditor();
                });
                }
                else {
                createEditor();
                }
                });

                function createEditor() {
                StackExchange.prepareEditor({
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: true,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: 10,
                bindNavPrevention: true,
                postfix: "",
                imageUploader: {
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                },
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                });


                }
                });














                draft saved

                draft discarded


















                StackExchange.ready(
                function () {
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53424998%2fhow-to-check-googlesignin-user-has-uploaded-image-or-default-image-set-by-google%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                0














                If he have not selected an image from withing your application. And there is an image that is being uploaded, then high chances are that it is an image provided by google. Just make sure to exempt place holder image when you are trying to upload.



                As for checking if google returned image is a image that user uploaded or google default, I checked with different path for both type of image and see no identifier that can segregate 2 type of images.






                share|improve this answer




























                  0














                  If he have not selected an image from withing your application. And there is an image that is being uploaded, then high chances are that it is an image provided by google. Just make sure to exempt place holder image when you are trying to upload.



                  As for checking if google returned image is a image that user uploaded or google default, I checked with different path for both type of image and see no identifier that can segregate 2 type of images.






                  share|improve this answer


























                    0












                    0








                    0







                    If he have not selected an image from withing your application. And there is an image that is being uploaded, then high chances are that it is an image provided by google. Just make sure to exempt place holder image when you are trying to upload.



                    As for checking if google returned image is a image that user uploaded or google default, I checked with different path for both type of image and see no identifier that can segregate 2 type of images.






                    share|improve this answer













                    If he have not selected an image from withing your application. And there is an image that is being uploaded, then high chances are that it is an image provided by google. Just make sure to exempt place holder image when you are trying to upload.



                    As for checking if google returned image is a image that user uploaded or google default, I checked with different path for both type of image and see no identifier that can segregate 2 type of images.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 22 '18 at 6:40









                    rptwsthirptwsthi

                    8,61385593




                    8,61385593

























                        0














                        As google is providing default profile pictures with the first letter of name it is quite difficult to identify if the profile picture is set by the user on google account or not. But if you want this any how then you can user OCR to identify if there is only one alphabet in the image retrieved from the google and that is same as the first letter of the Name of the user. Refer this link for OCR.



                        SwiftOCR



                        Thanks






                        share|improve this answer




























                          0














                          As google is providing default profile pictures with the first letter of name it is quite difficult to identify if the profile picture is set by the user on google account or not. But if you want this any how then you can user OCR to identify if there is only one alphabet in the image retrieved from the google and that is same as the first letter of the Name of the user. Refer this link for OCR.



                          SwiftOCR



                          Thanks






                          share|improve this answer


























                            0












                            0








                            0







                            As google is providing default profile pictures with the first letter of name it is quite difficult to identify if the profile picture is set by the user on google account or not. But if you want this any how then you can user OCR to identify if there is only one alphabet in the image retrieved from the google and that is same as the first letter of the Name of the user. Refer this link for OCR.



                            SwiftOCR



                            Thanks






                            share|improve this answer













                            As google is providing default profile pictures with the first letter of name it is quite difficult to identify if the profile picture is set by the user on google account or not. But if you want this any how then you can user OCR to identify if there is only one alphabet in the image retrieved from the google and that is same as the first letter of the Name of the user. Refer this link for OCR.



                            SwiftOCR



                            Thanks







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Nov 22 '18 at 7:15









                            hpphpp

                            584212




                            584212























                                0














                                When you do a signin with google assuming that you requested one of the profile scopes (i think) You can make a request against the userinfo endpoint



                                GET /oauth2/v2/userinfo HTTP/1.1
                                Host: www.googleapis.com
                                Content-length: 0
                                Authorization: Bearer ya29.GltcBnVqN8CQ5VpTe0qVSwYomBDGkAGtUSzvYBGti_mFKfemFjIPOE00HCOkfqMXpKVS6qUeMKgnzj2uPrxgvmBeeX4b0pDur3ttfGANCWceotLBMqFO4I47b9


                                This will return the public profile information that google has on the User.



                                HTTP/1.1 200 OK
                                Content-length: 313
                                X-xss-protection: 1; mode=block
                                Content-location: https://www.googleapis.com/oauth2/v2/userinfo
                                X-content-type-options: nosniff
                                Transfer-encoding: chunked
                                Expires: Mon, 01 Jan 1990 00:00:00 GMT
                                Vary: Origin, X-Origin, Referer
                                Server: ESF
                                -content-encoding: gzip
                                Pragma: no-cache
                                Cache-control: no-cache, no-store, max-age=0, must-revalidate
                                Date: Thu, 22 Nov 2018 07:06:47 GMT
                                X-frame-options: SAMEORIGIN
                                Alt-svc: quic=":443"; ma=2592000; v="44,43,39,35"
                                Content-type: application/json; charset=UTF-8
                                {
                                "picture": "https://lh5.googleusercontent.com/-a1CWlFnA5xE/AAAAAAAAAAI/AAAAAAAAl1I/UcwPajZOuN4/photo.jpg",
                                "name": "Linda Lawton",
                                "family_name": "Lawton",
                                "locale": "en",
                                "gender": "female",
                                "link": "https://plus.google.com/+LindaLawton",
                                "given_name": "Linda",
                                "id": "117200475532672775346"
                                }


                                As you can see it is returning my picture. This is the picture that i beleave i have uploaded to my Google+ account. As google is discontinuing Google+ i suspect these have all been exported over to the users Google account and there must be a way to upload a picture from their.



                                Now If I make a request against an account where i have not uploaded an image I get



                                HTTP/1.1 200 OK
                                Content-length: 326
                                X-xss-protection: 1; mode=block
                                Content-location: https://www.googleapis.com/oauth2/v2/userinfo
                                X-content-type-options: nosniff
                                Transfer-encoding: chunked
                                Expires: Mon, 01 Jan 1990 00:00:00 GMT
                                Vary: Origin, X-Origin, Referer
                                Server: ESF
                                -content-encoding: gzip
                                Pragma: no-cache
                                Cache-control: no-cache, no-store, max-age=0, must-revalidate
                                Date: Thu, 22 Nov 2018 07:11:24 GMT
                                X-frame-options: SAMEORIGIN
                                Alt-svc: quic=":443"; ma=2592000; v="44,43,39,35"
                                Content-type: application/json; charset=UTF-8
                                {
                                "picture": "https://lh5.googleusercontent.com/-GTTySn-WtmA/AAAAAAAAAAI/AAAAAAAAAAA/AGDgw-imFDZsZC-MaGnPIHPnh2Z95O-cSA/mo/photo.jpg",
                                "name": "Linda Lawton",
                                "family_name": "Lawton",
                                "locale": "da",
                                "link": "https://plus.google.com/108097091072786400385",
                                "given_name": "Linda",
                                "id": "108097091072786400385"
                                }


                                Which is



                                enter image description here



                                So even if the user has not personally uploaded an image Google creates a dummy one for them out of the first letter of their first or last name. There is no way for you to know if its a dummy image or an actual image unless you create some kind of image recognition system for detecting the dummy images.



                                Note: All of this was tested using oauthplayground data will be the same in IOs responses as well.






                                share|improve this answer




























                                  0














                                  When you do a signin with google assuming that you requested one of the profile scopes (i think) You can make a request against the userinfo endpoint



                                  GET /oauth2/v2/userinfo HTTP/1.1
                                  Host: www.googleapis.com
                                  Content-length: 0
                                  Authorization: Bearer ya29.GltcBnVqN8CQ5VpTe0qVSwYomBDGkAGtUSzvYBGti_mFKfemFjIPOE00HCOkfqMXpKVS6qUeMKgnzj2uPrxgvmBeeX4b0pDur3ttfGANCWceotLBMqFO4I47b9


                                  This will return the public profile information that google has on the User.



                                  HTTP/1.1 200 OK
                                  Content-length: 313
                                  X-xss-protection: 1; mode=block
                                  Content-location: https://www.googleapis.com/oauth2/v2/userinfo
                                  X-content-type-options: nosniff
                                  Transfer-encoding: chunked
                                  Expires: Mon, 01 Jan 1990 00:00:00 GMT
                                  Vary: Origin, X-Origin, Referer
                                  Server: ESF
                                  -content-encoding: gzip
                                  Pragma: no-cache
                                  Cache-control: no-cache, no-store, max-age=0, must-revalidate
                                  Date: Thu, 22 Nov 2018 07:06:47 GMT
                                  X-frame-options: SAMEORIGIN
                                  Alt-svc: quic=":443"; ma=2592000; v="44,43,39,35"
                                  Content-type: application/json; charset=UTF-8
                                  {
                                  "picture": "https://lh5.googleusercontent.com/-a1CWlFnA5xE/AAAAAAAAAAI/AAAAAAAAl1I/UcwPajZOuN4/photo.jpg",
                                  "name": "Linda Lawton",
                                  "family_name": "Lawton",
                                  "locale": "en",
                                  "gender": "female",
                                  "link": "https://plus.google.com/+LindaLawton",
                                  "given_name": "Linda",
                                  "id": "117200475532672775346"
                                  }


                                  As you can see it is returning my picture. This is the picture that i beleave i have uploaded to my Google+ account. As google is discontinuing Google+ i suspect these have all been exported over to the users Google account and there must be a way to upload a picture from their.



                                  Now If I make a request against an account where i have not uploaded an image I get



                                  HTTP/1.1 200 OK
                                  Content-length: 326
                                  X-xss-protection: 1; mode=block
                                  Content-location: https://www.googleapis.com/oauth2/v2/userinfo
                                  X-content-type-options: nosniff
                                  Transfer-encoding: chunked
                                  Expires: Mon, 01 Jan 1990 00:00:00 GMT
                                  Vary: Origin, X-Origin, Referer
                                  Server: ESF
                                  -content-encoding: gzip
                                  Pragma: no-cache
                                  Cache-control: no-cache, no-store, max-age=0, must-revalidate
                                  Date: Thu, 22 Nov 2018 07:11:24 GMT
                                  X-frame-options: SAMEORIGIN
                                  Alt-svc: quic=":443"; ma=2592000; v="44,43,39,35"
                                  Content-type: application/json; charset=UTF-8
                                  {
                                  "picture": "https://lh5.googleusercontent.com/-GTTySn-WtmA/AAAAAAAAAAI/AAAAAAAAAAA/AGDgw-imFDZsZC-MaGnPIHPnh2Z95O-cSA/mo/photo.jpg",
                                  "name": "Linda Lawton",
                                  "family_name": "Lawton",
                                  "locale": "da",
                                  "link": "https://plus.google.com/108097091072786400385",
                                  "given_name": "Linda",
                                  "id": "108097091072786400385"
                                  }


                                  Which is



                                  enter image description here



                                  So even if the user has not personally uploaded an image Google creates a dummy one for them out of the first letter of their first or last name. There is no way for you to know if its a dummy image or an actual image unless you create some kind of image recognition system for detecting the dummy images.



                                  Note: All of this was tested using oauthplayground data will be the same in IOs responses as well.






                                  share|improve this answer


























                                    0












                                    0








                                    0







                                    When you do a signin with google assuming that you requested one of the profile scopes (i think) You can make a request against the userinfo endpoint



                                    GET /oauth2/v2/userinfo HTTP/1.1
                                    Host: www.googleapis.com
                                    Content-length: 0
                                    Authorization: Bearer ya29.GltcBnVqN8CQ5VpTe0qVSwYomBDGkAGtUSzvYBGti_mFKfemFjIPOE00HCOkfqMXpKVS6qUeMKgnzj2uPrxgvmBeeX4b0pDur3ttfGANCWceotLBMqFO4I47b9


                                    This will return the public profile information that google has on the User.



                                    HTTP/1.1 200 OK
                                    Content-length: 313
                                    X-xss-protection: 1; mode=block
                                    Content-location: https://www.googleapis.com/oauth2/v2/userinfo
                                    X-content-type-options: nosniff
                                    Transfer-encoding: chunked
                                    Expires: Mon, 01 Jan 1990 00:00:00 GMT
                                    Vary: Origin, X-Origin, Referer
                                    Server: ESF
                                    -content-encoding: gzip
                                    Pragma: no-cache
                                    Cache-control: no-cache, no-store, max-age=0, must-revalidate
                                    Date: Thu, 22 Nov 2018 07:06:47 GMT
                                    X-frame-options: SAMEORIGIN
                                    Alt-svc: quic=":443"; ma=2592000; v="44,43,39,35"
                                    Content-type: application/json; charset=UTF-8
                                    {
                                    "picture": "https://lh5.googleusercontent.com/-a1CWlFnA5xE/AAAAAAAAAAI/AAAAAAAAl1I/UcwPajZOuN4/photo.jpg",
                                    "name": "Linda Lawton",
                                    "family_name": "Lawton",
                                    "locale": "en",
                                    "gender": "female",
                                    "link": "https://plus.google.com/+LindaLawton",
                                    "given_name": "Linda",
                                    "id": "117200475532672775346"
                                    }


                                    As you can see it is returning my picture. This is the picture that i beleave i have uploaded to my Google+ account. As google is discontinuing Google+ i suspect these have all been exported over to the users Google account and there must be a way to upload a picture from their.



                                    Now If I make a request against an account where i have not uploaded an image I get



                                    HTTP/1.1 200 OK
                                    Content-length: 326
                                    X-xss-protection: 1; mode=block
                                    Content-location: https://www.googleapis.com/oauth2/v2/userinfo
                                    X-content-type-options: nosniff
                                    Transfer-encoding: chunked
                                    Expires: Mon, 01 Jan 1990 00:00:00 GMT
                                    Vary: Origin, X-Origin, Referer
                                    Server: ESF
                                    -content-encoding: gzip
                                    Pragma: no-cache
                                    Cache-control: no-cache, no-store, max-age=0, must-revalidate
                                    Date: Thu, 22 Nov 2018 07:11:24 GMT
                                    X-frame-options: SAMEORIGIN
                                    Alt-svc: quic=":443"; ma=2592000; v="44,43,39,35"
                                    Content-type: application/json; charset=UTF-8
                                    {
                                    "picture": "https://lh5.googleusercontent.com/-GTTySn-WtmA/AAAAAAAAAAI/AAAAAAAAAAA/AGDgw-imFDZsZC-MaGnPIHPnh2Z95O-cSA/mo/photo.jpg",
                                    "name": "Linda Lawton",
                                    "family_name": "Lawton",
                                    "locale": "da",
                                    "link": "https://plus.google.com/108097091072786400385",
                                    "given_name": "Linda",
                                    "id": "108097091072786400385"
                                    }


                                    Which is



                                    enter image description here



                                    So even if the user has not personally uploaded an image Google creates a dummy one for them out of the first letter of their first or last name. There is no way for you to know if its a dummy image or an actual image unless you create some kind of image recognition system for detecting the dummy images.



                                    Note: All of this was tested using oauthplayground data will be the same in IOs responses as well.






                                    share|improve this answer













                                    When you do a signin with google assuming that you requested one of the profile scopes (i think) You can make a request against the userinfo endpoint



                                    GET /oauth2/v2/userinfo HTTP/1.1
                                    Host: www.googleapis.com
                                    Content-length: 0
                                    Authorization: Bearer ya29.GltcBnVqN8CQ5VpTe0qVSwYomBDGkAGtUSzvYBGti_mFKfemFjIPOE00HCOkfqMXpKVS6qUeMKgnzj2uPrxgvmBeeX4b0pDur3ttfGANCWceotLBMqFO4I47b9


                                    This will return the public profile information that google has on the User.



                                    HTTP/1.1 200 OK
                                    Content-length: 313
                                    X-xss-protection: 1; mode=block
                                    Content-location: https://www.googleapis.com/oauth2/v2/userinfo
                                    X-content-type-options: nosniff
                                    Transfer-encoding: chunked
                                    Expires: Mon, 01 Jan 1990 00:00:00 GMT
                                    Vary: Origin, X-Origin, Referer
                                    Server: ESF
                                    -content-encoding: gzip
                                    Pragma: no-cache
                                    Cache-control: no-cache, no-store, max-age=0, must-revalidate
                                    Date: Thu, 22 Nov 2018 07:06:47 GMT
                                    X-frame-options: SAMEORIGIN
                                    Alt-svc: quic=":443"; ma=2592000; v="44,43,39,35"
                                    Content-type: application/json; charset=UTF-8
                                    {
                                    "picture": "https://lh5.googleusercontent.com/-a1CWlFnA5xE/AAAAAAAAAAI/AAAAAAAAl1I/UcwPajZOuN4/photo.jpg",
                                    "name": "Linda Lawton",
                                    "family_name": "Lawton",
                                    "locale": "en",
                                    "gender": "female",
                                    "link": "https://plus.google.com/+LindaLawton",
                                    "given_name": "Linda",
                                    "id": "117200475532672775346"
                                    }


                                    As you can see it is returning my picture. This is the picture that i beleave i have uploaded to my Google+ account. As google is discontinuing Google+ i suspect these have all been exported over to the users Google account and there must be a way to upload a picture from their.



                                    Now If I make a request against an account where i have not uploaded an image I get



                                    HTTP/1.1 200 OK
                                    Content-length: 326
                                    X-xss-protection: 1; mode=block
                                    Content-location: https://www.googleapis.com/oauth2/v2/userinfo
                                    X-content-type-options: nosniff
                                    Transfer-encoding: chunked
                                    Expires: Mon, 01 Jan 1990 00:00:00 GMT
                                    Vary: Origin, X-Origin, Referer
                                    Server: ESF
                                    -content-encoding: gzip
                                    Pragma: no-cache
                                    Cache-control: no-cache, no-store, max-age=0, must-revalidate
                                    Date: Thu, 22 Nov 2018 07:11:24 GMT
                                    X-frame-options: SAMEORIGIN
                                    Alt-svc: quic=":443"; ma=2592000; v="44,43,39,35"
                                    Content-type: application/json; charset=UTF-8
                                    {
                                    "picture": "https://lh5.googleusercontent.com/-GTTySn-WtmA/AAAAAAAAAAI/AAAAAAAAAAA/AGDgw-imFDZsZC-MaGnPIHPnh2Z95O-cSA/mo/photo.jpg",
                                    "name": "Linda Lawton",
                                    "family_name": "Lawton",
                                    "locale": "da",
                                    "link": "https://plus.google.com/108097091072786400385",
                                    "given_name": "Linda",
                                    "id": "108097091072786400385"
                                    }


                                    Which is



                                    enter image description here



                                    So even if the user has not personally uploaded an image Google creates a dummy one for them out of the first letter of their first or last name. There is no way for you to know if its a dummy image or an actual image unless you create some kind of image recognition system for detecting the dummy images.



                                    Note: All of this was tested using oauthplayground data will be the same in IOs responses as well.







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Nov 22 '18 at 7:15









                                    DaImToDaImTo

                                    46.3k1164246




                                    46.3k1164246






























                                        draft saved

                                        draft discarded




















































                                        Thanks for contributing an answer to Stack Overflow!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid



                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.


                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function () {
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53424998%2fhow-to-check-googlesignin-user-has-uploaded-image-or-default-image-set-by-google%23new-answer', 'question_page');
                                        }
                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown







                                        這個網誌中的熱門文章

                                        Tangent Lines Diagram Along Smooth Curve

                                        Yusuf al-Mu'taman ibn Hud

                                        Zucchini