abacritt / angularx-social-login

Social login and authentication module for Angular 17
630 stars 387 forks source link

[Add] itp_support attr to Google btn #581

Closed NicolasRoehm closed 1 year ago

NicolasRoehm commented 1 year ago

I added itp_support boolean attribute to GoogleSigninButtonDirective. This allows users to disable the One Tap window in case we just want the button.

Sources : HTML API reference : data-itp_support Understand One Tap User Experience : Upgraded UX on ITP browsers

Example : One Tap UX

kattoshi commented 1 year ago

Build fails in my environment.
Does the build succeed?

------------------------------------------------------------------------------
Building entry point '@abacritt/angularx-social-login'
------------------------------------------------------------------------------
✖ Compiling with Angular sources in Ivy full compilation mode.
projects/lib/src/directives/google-signin-button.directive.ts:63:13 - error TS2345: Argument of type '{ type: "standard" | "icon"; size: "small" | "medium" | "large"; text: "signin_with" | "signup_with"; width: string; shape: "square" | "circle" | "pill" | "rectangular"; theme: "outline" | "filled_blue" | "filled_black"; logo_alignment: "center" | "left"; locale: string; itp_support: boolean; }' is not assignable to parameter of type 'GsiButtonConfiguration'.
  Object literal may only specify known properties, and 'itp_support' does not exist in type 'GsiButtonConfiguration'.

63             itp_support: this.itp_support,
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~