important
This is a contributors guide and NOT a user guide. Please visit these docs if you are using or evaluating SuperTokens.
Validation of AdditionalConfig of a provider config in the core
Status
This is just a proposal so far, it hasn't been accepted and needs further discussion.
- Status:
- proposed
- Deciders:
- rishabhpoddar, sattvikc
- Proposed by:
- sattvikc
- Created:
- 2022-12-08
#
Context and Problem StatementShould the additionalConfig (provider specific) (such as hd
for google workspaces, keyId
, teamId
etc for apple) validated in core, while adding or updating them?
#
Considered Options- Yes, Validate in core
- No provider specific validation in core
#
Decision OutcomeChosen option: Yes, Validate in core, because
- Reduces run time error by ensuring that the correct config is added to the database
- No major drawback of this approach
#
Pros and Cons of the Options#
Yes, Validate in coreThis means that the core will validate the provider specific additionalConfig, before saving in the database. Also, adding a noVerify
flag to the core API to let the user skip the validation.