function setupEmailLinkSignIn(sessionId, opt_email, opt_credential) {
  if (opt_email) {
    firebaseui.auth.storage.setEmailForSignIn(
        sessionId, opt_email, app.getAppId());
  }
  if (opt_email && opt_credential) {
    var pendingEmailCred = new firebaseui.auth.PendingEmailCredential(
        opt_email, opt_credential);
    firebaseui.auth.storage.setEncryptedPendingCredential(
        sessionId, pendingEmailCred, app.getAppId());
  }
}
Creates and saves the credentials, necessary for the view to load.
@param {string} sessionId The session identifier.
@param {?string=} opt_email The optional associated email to save in storage.
@param {?firebase.auth.AuthCredential=} opt_credential The optional
    credential to save in storage.