Social Login Functionality

Seemlessly onboard users via Social Login!

Get User Info

Prior to calling the login functionality, call getUserInfo() to initialize the Halliday client and get the page's current login state. If the user is already logged in, getUserInfo() will return the logged in user's info: name, email, and a signer. It is best to call this function upon app load along with any other places you need to acquire user info. There are no arguments to this function.

hallidayClient.getUserInfo()

Halliday supports Login with various social logins, including Google, Facebook, Twitter, and Email OTP. Calling each of these functions will redirect the user to a login page and after the login, redirect the user back to the original page. Upon redirect back to the original page, the page's login state will update, and calling getUserInfo will return the updated user info. Note that if a user logins in with Google and with Email OTP using the same gmail account, this will be treated as 2 separate accounts.

Login with Google

/**
 * Sends user to Google to login. Will then redirect to OpenLogin to
 * generate the wallet key, then redirect back to your login page.
 * If the process was successful, you'll be able to use getSigner()
 * to get their signer.
 */
hallidayClient.loginWithGoogle() 

Login with Facebook

/**
 * Sends user to Facebook to login. Will then redirect to OpenLogin to
 * generate the wallet key, then redirect back to your login page.
 * If the process was successful, you'll be able to use getSigner()
 * to get their signer.
 */
hallidayClient.loginWithFacebook() 

Login with Twitter

/**
 * Sends user to Twitter to login. Will then redirect to OpenLogin to
 * generate the wallet key, then redirect back to your login page.
 * If the process was successful, you'll be able to use getSigner()
 * to get their signer.
 */
hallidayClient.loginWithTwitter() 

Login with Email OTP

/**
 * Logs in with email OTP. After the user clicks on the link in
 * their email, the page will redirect back to your login page.
 * If the process was successful, you'll be able to use getSigner()
 * to get their signer.
 *
 * @param {string} email The email to log in with
 */
hallidayClient.loginWithEmailOTP(email) 

Inputs

NameDescriptionType
emailUser email to send OTP for confirmationstring

Logout

/**
 * Logs the user out
 */
hallidayClient.logout();