I'm building a SDK using zoid(consisting of multiple zoid components), and am unclear as to how I can secure multiple components with a auth i.e check if provided apikey
is valid. Instead of adding required prop for each zoid component I wanted to globally check apikey and/or other params before allowing the zoid component rendering on the parent.
One way i think i can accomplish this:
I can create a init function to the SDK class that can take api_key
as param, but am unclear how i can pass the the api_key
to all the zoid components params object.
As the SDK grows it may have 30+ components, and requiring api_key
for rendering each of 30+ components seems like bad UX.
Comments
Post a Comment