Skip to content

WebView doesn't honour fetch cookie authentication (Android Only) #16177

@grubstarstar

Description

@grubstarstar

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

react-native info didn't work so here are the versions as gathered manually:

Environment:
OS: macOS Sierra 10.12.6
Node: v6.10.1
Yarn: 1.1.0
npm: 3.10.10
Watchman: 4.7.0
Xcode: Version 8.3.2 (8E2002)
Android Studio: 2.3.3

react: 16.0.0-alpha.6
react-native: 0.44.0

Target Platform: iOS (10.3)

Steps to Reproduce

  1. Create a basic app that uses 'fetch's built in Cookie authentication.
  2. Make further API calls to your back end API with fetch to confirm that the authentication happens without having to do anything else.
  3. Once this is confirmed open a WebView to your website that uses the same Cookie as your API for authentication.
  4. Confirm that the WebView does not log in to the website as it does successfully on iOS.

Expected Behavior

I would expect the WebView to open the url with the auth Cookie implicitly passed through in the request, just as it does for iOS.

Actual Behavior

It doesn't log in to the WebView even though fetch is authenticated with back end API calls.

Reproducible Demo

It's difficult to create a reproducible demo because I would need to create a back end api and web server which share their cookie auth mechanism as well as the app which logins and makes backend requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleThere has been a lack of activity on this issue and it may be closed soon.

    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