FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Google identity provider

    Scheduled Pinned Locked Moved
    Q&A
    2
    4
    579
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      johndoexx
      last edited by johndoexx

      Hi
      I want to use API for Google identity provider with SpringBoot, I'm using fusionAuth dependency but I have problem with creating request:

      Here is my code and now I don't know how to set all values that are needed for this request:

      IdentityProviderRequest request = new IdentityProviderRequest();
      request.identityProvider.applicationConfiguration.put(UUID.fromString(appId), null);
      	    
      fusionAuthClient.createIdentityProvider(null, request);
      

      How to add all these values that are shown in JSON example with this Java code:

      {
        "identityProvider" : {
          "applicationConfiguration" : {
            "1c212e59-0d0e-6b1a-ad48-f4f92793be32" : {
              "createRegistration" : true,
              "enabled" : true
            }
          },
          "buttonText" : "Login with Google",
          "client_id" : "254311943570-8e2i2hds0qdnee4124socceeh2q2mtjl.apps.googleusercontent.com",
          "client_secret" : "BRr7x7xz_-cXxIFznBDIdxF1",
          "debug": false,
          "enabled" : true,
          "scope" : "profile",
          "type" : "Google"
        }
      }
      

      Are there any example of Java code for this or if someone can write here it would be great

      Also I want to ask what you suggest to use for google signin/signup, I have custom sign in and sign up forms and for that purpose using fusioAuth Login API, and what is best way to integrate google provider so if user click on that button for sign in with google that it open google sign in form? Is it possible to go with these Google APIs from fusionAuth pr you will suggest me something else?
      @dan @robotdan

      1 Reply Last reply Reply Quote 0
      • danD
        dan
        last edited by

        @johndoexx

        Can you explain what you are trying to accomplish? Are you trying to let a user login with Google or create an identity provider via the API?

        Have you seen this documentation? https://fusionauth.io/docs/v1/tech/identity-providers/google

        That steps you how to set up the user login with google using the FusionAuth hosted pages. You'd then theme the pages to make it look like your app.

        Does that help?

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        1 Reply Last reply Reply Quote 0
        • J
          johndoexx
          last edited by

          @dan
          I saw this documentation.
          Well i have made custom login page, I don´t use fusionAuth login page. So i want to add option for google sign in on that custom login page, but i don´t know which API i sholud call in that case?

          1 Reply Last reply Reply Quote 0
          • danD
            dan
            last edited by

            Hiya,

            It looks like this use case is documented in the 'Complete the Google Login' section of the API documentation: https://fusionauth.io/docs/v1/tech/apis/identity-providers/google#complete-the-google-login

            High level:

            1. Developer does the Google login dance themselves
            2. Google returns a token
            3. Developer calls the IdP Login API as outlined in the above link.

            Hope that helps. I've also filed a PR against the documentation to highlight this functionality.

            --
            FusionAuth - Auth for devs, built by devs.
            https://fusionauth.io

            1 Reply Last reply Reply Quote 0
            • First post
              Last post