asgardeo / asgardeo-auth-react-sdk

To maintain the implementation of Asgardeo React authentication SDK
Apache License 2.0
40 stars 91 forks source link

Accommodate custom params through config json. #103

Closed VivekVinushanth closed 9 months ago

VivekVinushanth commented 2 years ago

Is your suggestion related to an experience ? Please describe. Some sample apps might have the necessity to send custom parameters. Since, these sample apps are used in e2e, though it might be feasible to edit signin method, adding a config for custom parameter in config.json itself and adding this to url if it is not null, will be great in POV of e2e.

Ex: Adding this to config.json

{
    ...,
    "signInParams": {
        "fidp": "abc",
        "username": "email",
    }
}

And after null check signIn(authConfig.signInParams, ...);

Additional context This was actually required in enterprise login flow e2e automation where we have to send custom parameters.

pavinduLakshan commented 9 months ago

This is now possible in the latest SDK versions (v4 and onwards). Just pass the custom parameters as key value pairs to the config parameter in the signIn method.

signIn({
   "fidp": "abc",
   "username": "email",
});