How to pass the response_type in the FusionAuthProviderConfig of the react-sdk?
-
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_typeI can't seem to find a way to add this to the configuration.
Hope you can help me out here.
Kind regards,
RIchard
-
@richard-0 do you have a sample repo you could share, or your full config for the SDK?
-
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) => {},
}; -
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.