Custom Authentication

Learn how to integrate a full authentication flow within your application.


To allow users to authenticate their accounts from within your application, the steps will vary depending on the authentication flow used by the provider:

  • Credentials Flow : The provider accepts a set of credentials—such as a username and password, tokens, or connection parameters. During this process, the provider may also require the user to solve additional challenges like Two-Factor Authentication (2FA), One-Time Passwords (OTP), CAPTCHAs, or in-app validations.
  • QR Code Flow : The provider returns a QR code that must be displayed to the user. Your application should wait until the code is scanned and the authentication is completed. Each QR code have a short living time and must be refreshed when expired.
  • OAuth Flow: The provider uses a standard OAuth process, which involves redirecting the user to a login and consent screen. Once the user grants permission, they are redirected back to your application.

👍

Full example project on Github

Explore a complete example project used to support this guide on GitHub:https://github.com/unipile/unipile-auth-example


Here is what flow is used by each Provider. Follow the guide accordingly.

ProviderFlow
LinkedInCredentials Flow
IMAPCredentials Flow
InstagramCredentials Flow
FacebookCredentials Flow
X (Twitter)Credentials Flow
WhatsAppQR Code Flow
Google MessagesQR Code Flow
TelegramQR Code Flow
GoogleOAuth Flow
Microsoft OutlookOAuth Flow