GoogleSignInButton β
GoogleSignInButton
is globally availiable after plugin installation. Its also possible to directly import it from the vue3-google-signin
package.
This button renders default Google SignIn Button using Google API.
Props β
one-tap β
Type:
boolean
Default:
false
Trigger One Tap Login flow with the button.
auto-select β
Type:
boolean
Default:
false
This field determines if an ID token is automatically returned without any user interaction when there's only one Google session that has approved your app before
login-uri β
Type:
string
Default:
false
This attribute is the URI of your login endpoint. May be omitted if the current page is your login page, in which case the credential is posted to this page by default.
cancel-on-tap-outside β
Type:
boolean
Default:
true
This field sets whether or not to cancel the One Tap request if a user clicks outside the prompt.
prompt-parent-id β
Type:
string
This attribute sets the DOM ID of the container element.
nonce β
Type:
string
This field is a random string used by the ID token to prevent replay attacks.
context β
Type:
string
Default:
use
Allowed:
"signin" | "signup" | "use"
This field changes the text of the title and messages in the One Tap prompt.
state-cookie-domain β
Type:
string
If you need to display One Tap in the parent domain and its subdomains, pass the parent domain to this field so that a single shared-state cookie is used.
ux-mode β
Type:
string
Default:
popup
Allowed:
"popup" | "redirect"
Use this field to set the UX flow used by the Sign In With Google button.
allowed-parent-origin β
Type:
string | string[]
The origins that are allowed to embed the intermediate iframe. One Tap will run in the intermediate iframe mode if this field presents.
itp-support β
Type:
boolean
This field determines if the upgraded One Tap UX should be enabled on browsers that support Intelligent Tracking Prevention (ITP).
type β
Type:
"standard" | "icon"
Default:
standard
The button type: icon, or standard button.
theme β
Type:
"outline" | "filled_blue" | "filled_black"
Default:
outline
The button theme
size β
Type:
"large" | "medium" | "small"
Default:
large
The button size
text β
Type:
"signin_with" | "signup_with" | "continue_with" | "signin"
Default:
signup_with
The button text.
shape β
Type:
"rectangular" | "pill" | "circle" | "square"
Default:
rectangular
The button shape.
logo-alignment β
Type:
"left" | "center"
Default:
left
The alignment of the Google logo
width β
Type:
number
Default:
400
The minimum button width, in pixels.
locale β
Type:
string
The pre-set locale of the button text. If it's not set, the browser's default locale or the Google session userβs preference is used. Therefore, different users might see different versions of localized buttons, and possibly with different sizes.
Events β
@success β
- Arguments:
{credential: string; select_by: string; clientId: string}
- Read More
On successful login, this will be emitted
@error β
When an error occures this will be emitted
- Arguments:
{}
@intermediateIframeCloseCallback β
Overrides the default intermediate iframe behavior when users manually close One Tap by tapping on the 'X' button in the One Tap UI. The default behavior is to remove the intermediate iframe from the DOM immediately.
- Arguments:
{}
- Read More
@nativeCallback β
This event can be used to handle password credentials.
- Arguments:
{id: string; password: string;}
@promptMomentNotification β
This event emitted when the one-tap
prop is set to true
. This can be used to handle the prompt of one tap UI.
- Arguments:
PromptMomentNotification
- Read More