I've just updated the readme now, which should clarify some things, as well as updating the outdated initial example.
So safe-js can be used in node, or any browser, and that would use methods as listed in the readme.
However, when using the SAFE Browser, these methods are baked into the
window object, which means 1) they run internally in the background in beaker, and 2) you dont need to include your own copy of safe-js, they are automatically (and only) available to
So your example here, when uploaded to the network, should look like:
const app =
window.safeAuth.authorise( app );
Before uploading to the neteork, you'll need to test these same methods, which is why there's a
window.safeX polyfill available in the npm package. As described over here.
Hope that's helpful