๐
Provider Setup Guide
Step-by-step instructions to register OAuth apps for each provider. Select a provider below to get started.
TW
Twitter (X)
OAuth 2.0Developer Portalhttps://developer.twitter.com/en/portal/dashboard
Callback URL
https://hasontech.vn/api/auth/callback/twitterScopes
tweet.readusers.readoffline.access
ApprovalRequired ยท 24-72h (Tier 0 auto for basic read)
Refresh TokenYes
Setup Steps
- 1Create a Twitter Developer account at developer.twitter.com
- 2Create a new Project in the Developer Portal
- 3Create an App within the project
- 4Enable OAuth 2.0 in the App settings under Authentication
- 5Set the callback URL to https://hasontech.vn/api/auth/callback/twitter
- 6Copy your Client ID and Client Secret from the Keys and Tokens tab
Common Errors
| Error | Fix |
|---|---|
code_challenge required | PKCE is mandatory โ ensure your OAuth library sends code_challenge with every request |
redirect_uri_mismatch | Callback URL is case-sensitive โ match exactly including http vs https and trailing slashes |
Important Notes
- โขNo email scope is available through Twitter's OAuth 2.0
- โขPKCE (Proof Key for Code Exchange) is mandatory for all OAuth 2.0 flows
- โขTwitter API v1.1 is deprecated โ use v2 endpoints only
Provider Comparison
Quick reference for all login providers.
| Provider | Approval | Refresh Token | PKCE | |
|---|---|---|---|---|
Twitter (X) | 24-72h (Tier 0 auto for basic read) | No | Yes | Yes |
LinkedIn | Light review, 1-2h | Yes | No | No |
Reddit | Instant | No | Yes | No |
TikTok | 3-5 business days (mandatory review) | Yes | Yes | No |
VKontakte | Instant | Yes | No | No |
Mastodon | Instant | No | No | No |
LINE | Instant | Yes | Yes | No |
Twitter (X)
Approval:24-72h (Tier 0 auto for basic read)Email:NoRefresh Token:YesPKCE:Yes
LinkedIn
Approval:Light review, 1-2hEmail:YesRefresh Token:NoPKCE:No
Reddit
Approval:InstantEmail:NoRefresh Token:YesPKCE:No
TikTok
Approval:3-5 business days (mandatory review)Email:YesRefresh Token:YesPKCE:No
VKontakte
Approval:InstantEmail:YesRefresh Token:NoPKCE:No
Mastodon
Approval:InstantEmail:NoRefresh Token:NoPKCE:No
LINE
Approval:InstantEmail:YesRefresh Token:YesPKCE:No
Credentials go in your .env file โ never commit them to version control.