Difference between revisions of "Blockstack"
m (→Manifest File) |
m (→Notes) |
||
Line 39: | Line 39: | ||
If your manifest.json file does not have the correct domain/ip of the blockstack site requesting your ip it will complain that the "Access-Control-Allow-Origin" header is not set.<br> | If your manifest.json file does not have the correct domain/ip of the blockstack site requesting your ip it will complain that the "Access-Control-Allow-Origin" header is not set.<br> | ||
There does appear to be some caching issues with the app making it not work - try restarting the browser. | There does appear to be some caching issues with the app making it not work - try restarting the browser. | ||
+ | === Login Page === | ||
+ | The login page appears to need the header: Access-Control-Allow-Origin "*" set. |
Revision as of 19:50, 5 April 2018
Blockstack is
Contents
[hide]Authentication
Blockstack can work as an authentication provider for other Blockstack apps or for traditional websites. You can use the local app or the web version to perform the log-in service.
Using Blockstack
Install
To install yo and the Blockstack generator globally run:
sudo npm i -g yo generator-blockstack
To generate the app structure and install dependencies run (in the project directory):
yo blockstack
npm i
Then you can start the app like so:
npm run start
It will open a window in your browser at http://localhost:5000/
Notes
Manifest File
Blockstack needs access to a manifest.json file for the purposes of obtaining the details of your app, the file must have the following headers set:
- Access-Control-Allow-Origin "*"
- Access-Control-Allow-Methods "GET, POST, PUT, DELETE"
- Access-Control-Allow-Headers "Content-Type"
If your manifest.json file does not have the correct domain/ip of the blockstack site requesting your ip it will complain that the "Access-Control-Allow-Origin" header is not set.
There does appear to be some caching issues with the app making it not work - try restarting the browser.
Login Page
The login page appears to need the header: Access-Control-Allow-Origin "*" set.