socialSignIn
const url = 'https://example.com/api/auth/sign-in/social';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"callbackURL":"example","newUserCallbackURL":"example","errorCallbackURL":"example","provider":"apple","disableRedirect":true,"idToken":{"token":"example","nonce":"example","accessToken":"example","refreshToken":"example","expiresAt":1,"user":{"name":{"firstName":"example","lastName":"example"},"email":"example"}},"scopes":["example"],"requestSignUp":true,"loginHint":"example","additionalData":{"additionalProperty":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/auth/sign-in/social \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "callbackURL": "example", "newUserCallbackURL": "example", "errorCallbackURL": "example", "provider": "apple", "disableRedirect": true, "idToken": { "token": "example", "nonce": "example", "accessToken": "example", "refreshToken": "example", "expiresAt": 1, "user": { "name": { "firstName": "example", "lastName": "example" }, "email": "example" } }, "scopes": [ "example" ], "requestSignUp": true, "loginHint": "example", "additionalData": { "additionalProperty": "example" } }'Sign in with a social provider
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Callback URL to redirect to after the user has signed in
Callback URL to redirect to if an error happens
Disable automatic redirection to the provider. Useful for handling the redirection yourself
object
ID token from the provider
Nonce used to generate the token
Access token from the provider
Refresh token from the provider
Expiry date of the token
The user object from the provider. Only available for some providers like Apple.
object
object
Array of scopes to request from the provider. This will override the default scopes passed.
Explicitly request sign-up. Useful when disableImplicitSignUp is true for this provider
The login hint to use for the authorization code request
object
Responses
Section titled “Responses”Success - Returns session details (idToken branch) or an authorize URL (redirect branch)
Returns session details when idToken is provided, or an authorize URL otherwise
object
object
Example
{ "user": { "emailVerified": false, "twoFactorEnabled": false }}Bad Request. Usually due to missing parameters, or invalid parameters.
object
Examplegenerated
{ "message": "example"}Unauthorized. Due to missing or invalid authentication.
object
Examplegenerated
{ "message": "example"}Forbidden. You do not have permission to access this resource or to perform this action.
object
Examplegenerated
{ "message": "example"}Not Found. The requested resource was not found.
object
Examplegenerated
{ "message": "example"}Too Many Requests. You have exceeded the rate limit. Try again later.
object
Examplegenerated
{ "message": "example"}Internal Server Error. This is a problem with the server that you cannot fix.
object
Examplegenerated
{ "message": "example"}