IReactEmbedEventMap is set up for all event listeners in web-embed-api except unauthorized. Mirroring the conventions of the onRedirect property, this PR just adds in onUnauthorized to the appropriate locations, and updates tests and README accordingly.
Testing locally off my fork, change caused logged message to appear as expected when a junk token was deliberately provided:
And typical operation / no logged message when a genuine token is provided.
IReactEmbedEventMap
is set up for all event listeners inweb-embed-api
exceptunauthorized
. Mirroring the conventions of theonRedirect
property, this PR just adds inonUnauthorized
to the appropriate locations, and updates tests and README accordingly.Testing locally off my fork, change caused logged message to appear as expected when a junk token was deliberately provided:
And typical operation / no logged message when a genuine token is provided.