googleSignin Mutation
Description
Authenticates a user using a Google JWT token and creates a session.
mutation googleSignin($jwt: String!, $audience: String!) {
googleSignin(jwt: $jwt, audience: $audience) {
_id
configRef
type
user {
_id
firstName
lastName
name
email
addedAt
type
hasIntercom
hasPasscode
passwordToken
lastLogin
}
jwt
expires
createdAt
origin
adminDomains {
_id
siteName
active
domainName
}
shopName
admins {
_id
email
name
avatar
hasPasscode
}
deviceName
deviceId
mfa
ip
}
}
Variables
{
"jwt": "jwt",
"audience": "audience"
}
Response
{
"googleSignin": {
"_id": "f8fb1909b5dd91bc65c5aa29",
"configRef": "91b05653821c3de88e7f45ba",
"type": "example",
"user": {
"_id": "cb9625df7cbad316bb47b475",
"firstName": "example",
"lastName": "example",
"name": "example",
"email": "email@example.com",
"addedAt": 1737442144486,
"type": "example",
"hasIntercom": true,
"hasPasscode": true,
"passwordToken": "example",
"lastLogin": 1739643659882
},
"jwt": "example",
"expires": 1762388044178,
"createdAt": 1711491940613,
"origin": "example",
"adminDomains": [
{
"_id": "f533a73b5acceaebe5891649",
"siteName": "example",
"active": true,
"domainName": "example"
}
],
"shopName": "example",
"admins": [
{
"_id": "05e1aaf32939a23f3ac78e53",
"email": "email@example.com",
"name": "example",
"avatar": "example",
"hasPasscode": true
}
],
"deviceName": "example",
"deviceId": "example",
"mfa": true,
"ip": "example"
}
}
Arguments
| Name | Type | Description |
|---|---|---|
jwt | String! | JSON Web Token from Google authentication. |
audience | String! | Expected audience for the JWT token, typically the Google client ID. |