extensions/amp-access/0.1/signin.js
/**
   * Requests the viewer to perform login on behalf of the source origin
   * with the optional ID token. The result is the promise that will resolve
   * with the dialog's response.
   *
   * If viewer has not opted-in into signin protocol, this method returns
   * `null`. If source origin has not opted-in into signin protocol via
   * `signinServices: []` configration option that includes this viewer's
   * service, this method returns `null`.
   *
   * The viewer is only allowed to propagate ID token to the login dialog
   * when the user explicitly consents to it.
   *
   * @param {string} url
   * @return {?Promise<?string>}
   */
Requests the viewer to perform login on behalf of the source origin
with the optional ID token. The result is the promise that will resolve
with the dialog's response.

If viewer has not opted-in into signin protocol, this method returns
`null`. If source origin has not opted-in into signin protocol via
`signinServices: []` configration option that includes this viewer's
service, this method returns `null`.

The viewer is only allowed to propagate ID token to the login dialog
when the user explicitly consents to it.

@param {string} url
@return {?Promise}
Requests the viewer to perform login on behalf of the source origin with the optional ID token . The result is the promise that will resolve with the dialog ' s response . If viewer has not opted - in into signin protocol this method returns ` null ` . If source origin has not opted - in into signin protocol via ` signinServices : [] ` configration option that includes this viewer ' s service this method returns ` null ` . The viewer is only allowed to propagate ID token to the login dialog when the user explicitly consents to it . @param { string } url @return { ?Promise }
requestSignIn(url) {
    if (!this.supportsSignInService_) {
      return null;
    }
    return this.viewer_.sendMessageAwaitResponse('requestSignIn', dict({
      'origin': this.pubOrigin_,
      'url': url,
    })).then(resp => {
      const accessToken =  (resp);
      this.updateAccessToken_(accessToken);
      return '';
    });
  }
requestSignIn ( url ) { if ( ! this . supportsSignInService_ ) { return null ; } return this . viewer_ . sendMessageAwaitResponse ( 'requestSignIn' , dict ( { 'origin' : this . pubOrigin_ , 'url' : url , } ) ) . then ( resp => { const accessToken = ( resp ) ; this . updateAccessToken_ ( accessToken ) ; return '' ; } ) ; }
Requests the viewer to perform login on behalf of the source origin
 with the optional ID token.
Requests the viewer to perform login on behalf of the source origin with the optional ID token .
/** @type {?string} */ // Return empty dialog result.