aws-amplify / aws-amplify/amplify-android

Custom Http headers in Amplify Auth (signInWIthSocialWebUI)

Open
#2,714 1 comment 0 reactions 0 assignees View on GitHub
auth feature-request
Dominant language
Java
Stars
287
Forks
132
Avg merge
2d 2h
Merged PRs (30d)
45

Description

### Before opening, please confirm:

- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-android/issues?q=is%3Aissue+) and [discussions](https://github.com/aws-amplify/amplify-android/discussions).

### Language and Async Model

Not applicable

### Amplify Categories

Authentication

### Gradle script dependencies

```groovy
// Put output below this line

```

### Environment information

```
# Put output below this line

```

### Please include any relevant guides or documentation you're referencing

_No response_

### Describe the feature request

Amplify Auth social sign-in operations e.g. signinWithSocialWebUI to support passing custom HTTP headers or parameters, In this use case, the custom HTTP headers are need since the OAuth/HostedUI provider endpoints are proxied via 3rd party service Akamai which implement bot protection that works by requiring a custom header "x-acf-sensor-data" to be included with the request. It appears the initial request (/authorize) seems to work fine, however it seems request to /token are blocked since the custom header is not present.

### Initialization steps (if applicable)

_No response_

### Code Snippet

```java
// Put your code below this line.

```

### amplifyconfiguration.json

_No response_

### GraphQL Schema

```graphql
// Put your schema below this line

```

### Additional information and screenshots

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by tracing signInWithSocialWebUI through the OAuth requests described in the issue, especially /authorize and /token. Determine how custom HTTP headers or parameters could be passed through both requests, including x-acf-sensor-data; done means social sign-in can send the caller-provided value to the proxied provider endpoints.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
authentication, mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.