Hi all,
I want to be able to request the user’s email using ‘email scope’. To teach myself, I am trying to modify the Animal Kingdom tutorial so it uses email scope. However, after enabling email scope, when I run the app, email seems to be undefined. Does anyone know how to make it work?
More details:
I made two changes to the Animal Kingdom tutorial. In constants.js I modified this line to include email scope
export const appConfig = new AppConfig(['store_write', 'publish_data','email'])
And in SignedIn.js I am trying to capture the email with
const email = this.userSession.loadUserData().email
console.log(email)
See the entire code here
Any help would be appreciated.
I believe that @zone117x may have the best guidance for you here since he’s the most recent to have worked on this functionality. Sorry you’re running into problems! Hopefully we can help you diagnose and resolve quickly here.
1 Like
The email scope fix was delivered in the blockstack browser v 0.36.1
1 Like
I pulled your repo and replicated the same error using the Web version of the Blockstack Browser which I assume is running the latest browser code. Replacing email
with another value such as identityAddress
just caused the app to hang on signin. This could be related to how or when you (or I) were accessing the data or it could be a bug.
@jefreybulla.id can you file an issue here: https://github.com/blockstack/blockstack.js/issues/new
We regularly review the issues in the repo.
We also have a new release of the library 19.1.0. I’ll update the animal-kingdom
repo to use this latest library. I ran my test with this latest version 19.1.0
1 Like
Thanks for the idea!
@zone117x do you have any suggestion on how to succeed at requesting the user’s email address?
Got it. I see it’s in pre-release stage. When should we expect to have it in the Web version of the Blockstack Browser?