InfoThis documentation is just for PropelAuth Components, an optional library for those who want deeper design control over their UIs.Click here to view our standard documentation

Social Provider Login & Signup Component

PropelAuth's Social Provider Login & Signup component allows you to customize your login and signup pages with social login / sso, such as logging in with Google, Microsoft, and more. It is designed to be used when your user has a Login State of LOGIN_REQUIRED.

Social Provider Login & Signup


Reference APIs

These are the APIs that are used by the above component. You can use these APIs directly in your own code.

loginWithSocialProvider

Redirects the user to login with the specified Social Login provider. If signups are enabled, will create a new user if one does not already exist.

Arguments

  • Name
    provider *
    Type
    SocialLoginProvider
    Description
    The provider to login with. Must be one of these options:
    • Google
    • Github
    • Microsoft
    • Slack
    • Salesforce
    • Linkedin
    • Outreach
    • Quickbooks
    • Xero
    • Salesloft
    • Atlassian
    • Apple

Request

import { SocialLoginProvider } from '@propelauth/frontend-apis'
const { loginWithSocialProvider } = useAuthFrontendApis()

// Typescript version
<button onClick={() => loginWithSocialProvider(SocialLoginProvider.GITHUB)}>
    Login with Github
</button>

// Javascript version
<button onClick={() => loginWithSocialProvider("Google")}>
    Login with Google
</button>