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

    How to pass the response_type in the FusionAuthProviderConfig of the react-sdk?

    Scheduled Pinned Locked Moved Unsolved
    Q&A
    4
    4
    2.6k
    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.
    • R
      richard 0
      last edited by

      Dear reader,

      I'm using the example react application from your github repo.
      All works fine.

      Now i'm trying to use my remote hosted instance of FusionAuth and updated the config with my clientId and serverUrl. I also whitelisted localhost:3000 in the admin panel.

      Now when i click login, the login url is "/app/login" instead of "/oauth2/authorize".
      I've added the "loginPath" to the config, which does the job.
      I do wonder why a different loginUrl is generated when i change the clientId.

      But now i'm getting the following error in the url:
      error=invalid_request&error_reason=missing_response_type&error_description=The+request+is+missing+a+required+parameter%3A+response_type

      I can't seem to find a way to add this to the configuration.

      Hope you can help me out here.

      Kind regards,

      RIchard

      A 1 Reply Last reply Reply Quote 0
      • A
        Alex Patterson @richard 0
        last edited by

        @richard-0 do you have a sample repo you could share, or your full config for the SDK?

        D 1 Reply Last reply Reply Quote 0
        • E
          eduardo.soller
          last edited by

          Hi
          I have the exact same issue.
          Have you figured this out?

          My config:

          const config: FusionAuthProviderConfig = {
          loginPath: "/oauth2/authorize/",
          logoutPath: "/oauth2/logout",
          registerPath: "/oauth2/register",
          clientId: "my-client-id",
          redirectUri: "http://localhost:3000/account", login/register/logout action
          serverUrl: "/oauth2/token",
          shouldAutoFetchUserInfo: true,
          shouldAutoRefresh: true,
          onRedirect: (state?: string) => {},
          };

          1 Reply Last reply Reply Quote 0
          • D
            devops 2 @Alex Patterson
            last edited by

            We have this same problem 😔.

            We followed the quickstart: https://fusionauth.io/docs/quickstarts/quickstart-javascript-react-web.
            Like @richard-0, the only difference is we use a hosted FusionAuth instance (that is working well for our Laravel app).

            The response is the same: missing_response_type

            Going over the SDK it seems that there is no response_type parameter.

            The SDK needs to be updated. Can you guys look into that?

            Also: I am fairly confident that when I tried to set this up earlier this year, that it did work. So I have feeling this was changed fairly recently.

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