My app is hosted on an S3 bucket and it works correctly when served directly from the bucket. Blockstack auth works well and all the CORS headers look good - http://entaxy-production.s3-website.ca-central-1.amazonaws.com/
On top of that I added CloudFront so I can setup my domain name instead of the S3 generated url. The CORS headers look good but blockstack auth is now broken and I can’t figure out why. I’m still using the CloudFront generated url before I switch my domain https://d1eymu5czkzdwx.cloudfront.net
I think you’ve got a problem with the parameters you pass to redirectToSignin. I plagairized this from somewhere:
// Open the blockstack browser for sign in
// After choosing an Id to sign in with, redirect back to the login page
userSession.redirectToSignIn(
`${window.location.origin}/`,
`${window.location.origin}/manifest.json`,
['store_write', 'publish_data'])
return { type: USER_LOGIN }
}
Regarding the params I don’t think that’s the case, all the params for redirectToSignIn have default values so you don’t need to pass them in unless you need something different. In my case only the first param redirectURI is a different route. Don’t see how that would cause this problem.
Thanks for trying though
Error while trying to use the following icon from the Manifest: https://browser.blockstack.org/static/images/app-blockstack.png (Download error or resource isn't a valid image)
main.eac9eaaae65a2a0fb07d.chunk.js:1 GET http://localhost:1337/http://entaxy-production.s3-website.ca-central-1.amazonaws.com/manifest.json net::ERR_CONNECTION_REFUSED
from the cloudfront link, I get this:
Access to fetch at 'https://d1eymu5czkzdwx.cloudfront.net/manifest.json' from origin 'https://browser.blockstack.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.