Specify an email address

Our volunteers haven't translated this article into 日本語 yet. Join us and help get the job done!
You can also read the article in English (US).

BrowserID enables a user to have multiple identities, each represented by a different email address, and choose which one to sign in with. If a user has multiple email addresses which can be verified using BrowserID, then when a web site calls navigator.id.get(), the user will be presented with all their addresses, and asked which one to use.

Sometimes, though, a web site knows which email the user needs to choose. For example, if Alice shares a photo with Bob using a BrowserID-enabled photo-sharing site, the web site needs to authenticate Bob against the exact email address Alice used to invite him. If Bob chooses the wrong email from multiple choices the invitation will fail.

In this situation the web site can require that the user use a particular email address by setting the requiredEmail option as an argument to navigator.id.get(). For example:

navigator.id.get(gotAssertion, {requiredEmail: \"bob@example.com\"});

Even if Bob has multiple email addresses, he'll only be presented with "bob@example.com". The web site's gotAssertion() function is guaranteed to be called with either an assertion for "bob@example.com", or with a null assertion.


 このページの貢献者: fscholz, Sheppy, wbamberg
 最終更新者: fscholz,