← Blog·Tutorial

Google Action Account Linking with Auth0

Alex Swetlow··8 min read

Google Account Linking works differently from Alexa's implementation. In Google's system, the user authenticates through your Auth0 login page during a voice or text interaction, and Google stores the access token for future sessions. This guide walks through the setup using Jovo.

How Google Account Linking Differs from Alexa

While Alexa Account Linking happens in the Alexa app, Google's flow happens inline — the Assistant prompts the user to sign in through a web view on their phone or smart display. The flow supports both OAuth 2.0 and Google Sign-In.

Setup

In your jovo.project.ts, configure the Google Assistant plugin:

googleAssistant: {

accountLinking: {

type: 'AUTH_CODE',

authorizationUrl: 'https://YOUR_DOMAIN.auth0.com/authorize',

tokenUrl: 'https://YOUR_DOMAIN.auth0.com/oauth/token',

clientId: 'YOUR_CLIENT_ID',

clientSecret: 'YOUR_CLIENT_SECRET',

scopes: ['openid', 'profile']

}

}

Handling the Sign-In Result

async LAUNCH() {

const accessToken = this.$request.getAccessToken();

if (!accessToken) {

return this.$send('Please sign in to continue.');

}

const profile = await fetchAuth0Profile(accessToken);

return this.$send({ message: `Hi ${profile.name}!` });

}