Skip to content

Redirect URL not working properly on android #17724

@WaqasFarooqSobha

Description

@WaqasFarooqSobha

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Auth

Which platforms are affected?

Android

Description

Microsoft login with Firebase Authentication (signInWithRedirect) works correctly on iOS but fails on Android with different browsers like Google Chrome and Samsung internet
Observed Behavior

On Android devices:
After redirecting to Microsoft login and completing login process it shows
"Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared. Some specific scenarios are - 1) Using IDP-Initiated SAML SSO. 2) Using signInWithRedirect in a storage-partitioned browser environment.".

Login succeeds only after retrying multiple times by refreshing page and then it redirects back to application with success
On iOS (Safari), login works consistently without errors.

Reproducing the issue

Just try to login with microsoft on Android it will redirect to browser after completing login process( email, password authentication) it shows error message inside the browser

Image

. then try to refresh multiple times and press back button then the browser will close and it will redirect to app with success message.

Firebase Core version

4.1.0

Flutter Version

3.35.2

Relevant Log Output

"Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared. Some specific scenarios are - 1) Using IDP-Initiated SAML SSO. 2) Using signInWithRedirect in a storage-partitioned browser environment.".

Flutter dependencies

firebase_core: ^4.1.0
firebase_messaging: ^16.0.1
firebase_auth: ^6.0.2
firebase_crashlytics: ^5.0.1
firebase_remote_config: ^6.0.1
firebase_app_check: ^0.4.0+1

Additional context and comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: androidIssues / PRs which are specifically for Android.plugin: authresolution: invalidThis doesn't seem right and might not belong here.type: bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions