Social Login #
How to login using Social Login #
This function allows a client application to authenticate with AppKey using a social account, either Apple or Google. The user can log in via a passkey or a social account. Social login is supported because major providers are adopting passkeys as their authentication strategy. Additionally, it simplifies access by letting users delegate authentication to a social provider rather than creating a separate account.
URL #
/api/appuser/socialLogin
Method #
POST
Headers #
app-token: "<App Token>"
Data Parameter #
{
token: "<apple identity token or google auth token>",
provider: <'apple' or 'google'>
}
Response: #
Success: #
StatusCode: #
200 (OK)
Contents: #
{
appId: <uuid>,
appUserId: <uuid>,
loginProvider: <'apple' or 'google'>
handle: <email | phone_number>,
displayName: <display name>,
status: <'active', 'suspended'>,
lastLogin: "2024-09-03T13:21:34.000Z",
jwt: <jwt token>
access-token: <jwt access token>,
createdAt: "2024-09-02T08:16:07.000Z",
updatedAt: "2024-09-03T13:21:30.000Z"
}
Error: #
StatusCode: #
400 (BAD REQUEST)
500 (INTERNAL SERVER ERROR)
Content: #
{
code: "<internal error code>",
message: "<readable error description>"
}
The internal codes are integers:
- 400 - invalid app token
- 401 - app no longer exists
- 402 - app is suspended
- 403 - missing parameter
- 404 - user account is suspended
- 413 - app is migrated
- 500 - internal server error
- 600 - invalid login credentials
- 603 - email does not exist
- 607 - user name does not exist