Specify an email address

by 3 contributors:
この記事はまだ日本語に翻訳されていません。MDN の翻訳はボランティアによって行われています。是非 MDN に登録し、私たちの力になって下さい。

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.

ドキュメントのタグと貢献者

タグ: 
Contributors to this page: fscholz, Sheppy, wbamberg
最終更新者: fscholz,