| Index: lib/src/google-signin/google-signin.html
|
| diff --git a/lib/src/google-signin/google-signin.html b/lib/src/google-signin/google-signin.html
|
| index 5bf7f958ce969abc2797613130750ee5c3f712c3..b8496df0118aef57de4253a659843ef16a7dd7c2 100644
|
| --- a/lib/src/google-signin/google-signin.html
|
| +++ b/lib/src/google-signin/google-signin.html
|
| @@ -17,6 +17,9 @@
|
| client-id="{{clientId}}"
|
| cookie-policy="{{cookiePolicy}}"
|
| request-visible-actions="{{requestVisibleActions}}"
|
| + hosted-domain="{{hostedDomain}}"
|
| + offline="{{offline}}"
|
| + offline-always-prompt="{{offlineAlwaysPrompt}}"
|
| scopes="{{scopes}}"
|
| signed-in="{{signedIn}}"
|
| is-authorized="{{isAuthorized}}"
|
| @@ -144,6 +147,13 @@ activities (https://developers.google.com/+/web/app-activities/) on behalf of
|
| the user. Please note that this attribute is only valid in combination with the
|
| plus.login scope (https://www.googleapis.com/auth/plus.login).
|
|
|
| +The `offline` attribute allows you to get an auth code which your server can
|
| +redeem for an offline access token
|
| +(https://developers.google.com/identity/sign-in/web/server-side-flow).
|
| +You can also set `offline-always-prompt` instead of `offline` to ensure that your app
|
| +will re-prompt the user for offline access and generate a working `refresh_token`
|
| +even if they have already granted offline access to your app in the past.
|
| +
|
| Use label properties to customize prompts.
|
|
|
| The button can be styled in using the `height`, `width`, and `theme` attributes.
|
| @@ -151,12 +161,15 @@ These attributes help you follow the Google+ Sign-In button branding guidelines
|
| (https://developers.google.com/+/branding-guidelines).
|
|
|
| The `google-signin-success` event is triggered when a user successfully authenticates
|
| -and `google-signed-out` is triggered when user signeds out.
|
| +and `google-signed-out` is triggered when user signs out.
|
| You can also use `isAuthorized` attribute to observe user's authentication state.
|
|
|
| Additional events, such as `google-signout-attempted` are
|
| triggered when the user attempts to sign-out and successfully signs out.
|
|
|
| +When requesting offline access, the `google-signin-offline-success` event is
|
| +triggered when the user successfully consents with offline support.
|
| +
|
| The `google-signin-necessary` event is fired when scopes requested via
|
| google-signin-aware elements require additional user permissions.
|
|
|
| @@ -197,6 +210,14 @@ any apps you're building. See the Google Developers Console
|
| */
|
|
|
| /**
|
| + * Fired when an offline authorization is successful.
|
| + * @event google-signin-offline-success
|
| + * @param {Object} detail
|
| + * @param {string} detail.code The one-time authorization code from Google.
|
| + * Your application can exchange this for an `access_token` and `refresh_token`
|
| + */
|
| +
|
| + /**
|
| * Fired when this scope is not authorized
|
| * @event google-signin-aware-signed-out
|
| */
|
| @@ -287,6 +308,7 @@ any apps you're building. See the Google Developers Console
|
| type: String,
|
| computed: '_computeSigninLabel(labelSignin, width, _brand)'
|
| },
|
| +
|
| /**
|
| * An optional label for the sign-out button.
|
| */
|
| @@ -313,6 +335,33 @@ any apps you're building. See the Google Developers Console
|
| },
|
|
|
| /**
|
| + * The Google Apps domain to which users must belong to sign in.
|
| + * See the relevant [docs](https://developers.google.com/identity/sign-in/web/reference) for more information.
|
| + */
|
| + hostedDomain: {
|
| + type: String,
|
| + value: ''
|
| + },
|
| +
|
| + /**
|
| + * Allows for offline `access_token` retrieval during the signin process.
|
| + */
|
| + offline: {
|
| + type: Boolean,
|
| + value: false
|
| + },
|
| +
|
| + /**
|
| + * Forces a re-prompt, even if the user has already granted offline
|
| + * access to your application in the past. You only need one of
|
| + * `offline` and `offlineAlwaysPrompt`.
|
| + */
|
| + offlineAlwaysPrompt: {
|
| + type: Boolean,
|
| + value: false
|
| + },
|
| +
|
| + /**
|
| * The scopes to provide access to (e.g https://www.googleapis.com/auth/drive)
|
| * and should be space-delimited.
|
| */
|
|
|