A non-transitory computer readable medium storing computer executable instructions, which, when executed by a processor circuitry, causes the circuitry to carry out a method for embedding a widget provided by a first-party system in a third-party application, the method comprising:
- providing the third-party application with an embeddable first-party widget for embedding in a third-party web page, wherein the third-party web page is controlled by the third-party application;
- receiving a message at the embedded first-party widget from the embedding third-party application, wherein the message comprises an application identifier and an origin identifier;
- receiving at a first-party server from the embedded first-party widget the application identifier and the origin identifier;
- authenticating the application identifier at the first-party server, wherein said authenticating the application identifier comprises determining whether the application identifier references a valid third-party application;
- authenticating the origin identifier at the first-party server, wherein said authenticating the origin identifier comprises determining whether the origin identifier is associated with the valid third-party application that is referenced by the authenticated application identifier;
- and
- in response to said authenticating the application identifier and the origin identifier, enabling the first-party widget to access the first-party system from the embedding third-party application.