Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

safe-js not available on localhost unless using the polyfill #16

Open
happybeing opened this issue Nov 14, 2016 · 3 comments
Open

safe-js not available on localhost unless using the polyfill #16

happybeing opened this issue Nov 14, 2016 · 3 comments

Comments

@happybeing
Copy link

Operation System: Linux
Beaker Version: 0.4.0 (also 0.3.6-2)

I've been using the polyfill exclusively so have only just tried without and find that safe-js is not working on localhost unless you use the polyfill.

Fine on a live safe: URL though.

With localhost, not polyfill and websecurity disabled, a new tab loaded with my safe site and I poke around in the debug console I can only get this object and method:

window.safeAuth.getAuthToken()

No other safeAuth methods, no safeNFS or safeDNS objects! But with the polyfill they are all there and working.

It is not a problem as I can just use the polyfill until I deploy, but I think it is supposed to work without it as well, even on localhost.

@joshuef
Copy link
Owner

joshuef commented Nov 15, 2016

@theWebalyst safejs etc should only be loaded into the window object when on safe: urls, so this is expected behaviour.

What's curious here is that safeAuth.getAuthToken shows up...

@joshuef
Copy link
Owner

joshuef commented Dec 7, 2016

@theWebalyst are you still seeing this in newer versions? Can you let me know the url you're on when this is showing up, please.

@happybeing
Copy link
Author

I was probably mistaken on safeAuth.getAuthToken() - it appears in the menu but I now realise that isn't necessarily because it is present on the object (it remembers past selections!).

So assume you're good here I suggest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants