Skip to content

Setting cookie prefixes host_key with a period #181

@Thenlie

Description

@Thenlie
  if (Platform.OS === 'android') {
    CookieManager.set(
      'https://attendee-login-service-dev.us-east-1.lb.com/attendee-login',
      {
        name: 'AttendeeLoginOAuthToken',
        value: 'test',
        domain: 'attendee-login-service-dev.us-east-1.lb.com',
        path: '/attendee-login',
        version: 1,
        expires: '2023-09-01T00:00:00.00'
      }
    ).then(success => {
      if (success) LOG.debug('CookieManager.set =>', success);
      else LOG.error('CookieManager.set =>', success);
    });
  }

I am using this snippet and attempting to overwrite a cookie that already exists. My hope is that it will update the value to whatever is passed in the value field.

Expected: Update the existing cookie value to test
Actual: Creates a new cookie with the key .attendee-login-service-dev.us-east-1.lb.com

image

I am unsure why the period is being added to the start of the domain. Can anyone shed some light?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions