Skip to content
GitHubBuy Me A CoffeeBuy Me A CoffeePaypalPaypal

Options

Plugin Options and GoogleLogin Component Props

Options used when initializing the plugin and prop values in the GoogleLogin component are similar.

NameTypeDescription
clientIdStringGoogle API client ID
promptBooleanSet this to true to display the One Tap prompt

Setting this value as a prop of the GoogleLogin component will be ignored if this is set as option on plugin initialization
autoLoginBooleanSetting this value to true will make the prompt to automatically log in without any user interactions

For this to work prompt must be set to true

Setting this value as a prop of the GoogleLogin component will be ignored if this is set as option on plugin initialization
popupTypeStringType of callback response, accepts either CODE or TOKEN, this only works if a custom button is added as a slot
callbackFunctionThe callback function which will be triggered with a response object once the login is completed
errorFunctionAn error function which will be triggered on any error encountered while showing the prompts/popups
idConfigurationObjectIdConfiguration object for initializing, see list of fields and descriptions of the IdConfiguration here
buttonConfigObjectConfiguration of the login button rendered by Google, see list of fields and descriptions here

Function googleOneTap

googleOneTap function accepts the following options:

NameTypeDescription
clientIdStringGoogle API client ID
contextStringThe title and words in the One Tap prompt, this can be signin|signup|use see here for more info
autoLoginBooleanSet this to true if you want the one-tap prompt to automatically login
cancelOnTapOutsideBooleanControls whether to cancel the prompt if the user clicks outside of the prompt

Function googleAuthCodeLogin and googleTokenLogin

googleAuthCodeLogin and googleTokenLogin functions accept an object with a client id. This is useful if you are not planning to initialize the plugin in main.js:

NameTypeDescription
clientIdStringGoogle API client ID