Open source / self-hosted GitHub
Sign in with [insert OAuth provider here]
In Beta: Let your users create their account and sign-in via OAuth providers.
While in beta only three external OAuth providers are
supported: Google, Twitter, and Facebook.
Here’s the proposed API to start the sign-in/sign-up process.
// this will open the authorization window at the provider
const user = await backend.socialLogin("google");
console.log(user);
// prints
/*
{
token: "your SB user's session token",
email: "user's email",
name: "user's full name",
first: "user's first name",
last: "user's last name",
avatarUrl: "user's avatar URL"
}
*/
socialLogin
function with a supported provider
triggers the authorization process opening a new tab asking the user to approve
the request.There’s a maximum number of time this process will wait for the user to complete the authentication flow.
© 2021 Focus Centric Inc. All rights reserved.