Javatpoint Logo
Javatpoint Logo

Polymer Google Signin

The Polymer Google signin element is used for Google authentication to interact with drive and Google+ APIs.

Note: You have to enable the APIs in Google Developers Console before using them.

Parameter Explanation:

clientId: clientId can be obtained from the Google Developers Console. https://console.developers.google.com/cloud-resource-manager?previousPage=%2F

scopes: It is used to define the necessary scope permissions.

requestVisibleActions: This attribute is used to write app activities (https://developers.google.com/+/web/app-activities/)on user's behalf.

offline: This attribute is used to obtain an auth code for your server to save for an offline access token (https://developers.google.com/identity/sign-in/web/server-side-flow).

You can use the attributes like height, width and theme to style the button by which you can follow the Google+ Sign-In button branding guidelines (https://developers.google.com/+/branding-guidelines).

Polymer Google Signin Events

google-signin-success: The signin-success event is triggered when a user is authenticated successfully. You can notice the authentication state of a user by using the isAuthorized attribute.

google-signed-out: The signed-out event is triggered when a user signs out.

google-signout-attempted: The signout-attempted event is triggered when a user attempts to sign out.

google-signin-offline-success: The signin-offline-success event is triggered when a user attempts to sign out.

google-signin-necessary: The signin-necessary event is triggered when the scope needs additional user permissions that are requested via google-signin-aware elements.


Next TopicStreet View Pano




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA