firebase / firebase/firebase-android-sdk
[firebase_auth]: Use AuthTabIntent (Auth Tab) by default for OAuth provider sign-in(via Custom Chrome Tab)
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 710
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 34
Description
## What feature would you like to see?
When FirebaseAuth.getInstance().startActivityForSignInWithProvider(...) launches a browser for an OAuth flow, it should use the AuthTabIntent API (from androidx.browser:browser) by default on supported devices.
Using AuthTabIntent provides a more secure, modern, and streamlined authentication experience, as recommended by the Chrome team: https://developer.chrome.com/docs/android/custom-tabs/guide-auth-tab
## How would you use it?
This feature would be used automatically by the SDK. By adopting AuthTabIntent, Firebase Auth would provide several key benefits:
1. Enhanced Security (Per the Documentation):
The AuthTabIntent API uses a modern ActivityResultLauncher callback instead of a traditional Intent to return the result.
This provides enhanced security by transferring data directly between the API and the app, reducing potential risks associated with intent handling.
1. Streamlined User Experience (Per the Documentation):
The UI is minimal and focused purely on the authentication task.
Unnecessary browser features (like the share button, bookmarks, long-press menus, etc.) are removed, preventing user distraction.
Contributor guide
Research direction
Start from FirebaseAuth.getInstance().startActivityForSignInWithProvider(...) and review the androidx.browser AuthTabIntent documentation linked in the issue. Check how OAuth provider sign-in currently launches and returns from the browser, then verify that AuthTabIntent is used by default on supported devices while preserving the authentication result flow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- api, authentication, mobile-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100