prismatic-io / embedded

Prismatic's library for embedding Prismatic.io into your application.
MIT License
24 stars 3 forks source link

Throw an error if showMarketplace() or similar functions are called before a successful authenticate() #66

Closed taylorreece closed 5 months ago

taylorreece commented 5 months ago

Currently, if you omit a prismatic.authenticate() call, or if your call fails but is not caught, a showMarketplace() or similar call will still inject an iframe but the iframe will contain a 404 screen. This makes it so a successful prismatic.authenticate() call must run before subsequent calls are allowed, and an instructive error is thrown if you attempt to call showMarketplace() prior to authenticate().

taylorreece commented 5 months ago

The latest commit also causes an error to be thrown if someone tries to call prismatic.showDesigner or prismatic.showIntegrations for a customer user who does not have embedded designer enabled.