supertokens-node
supertokens-node copied to clipboard
Enhancement: Improve handling of OAuth providers with single configuration when clientType is specified
Consider a case where one OAuth provider has multiple config with different clientType but providers have only one config. Since, the frontend client has setup the clientType in the global config, it will always pass that but the backend SDK will fail to find the config for the provider with the given clientType as there is only one config (without specified clientType).
Currently, users need to provide multiple config for each provider in the backendConfig to fix this but a SDK level fix could just ignore the clientType if the provider has only one config.