aws-amplify / aws-amplify/amplify-studio

Creating Amplify auth social sign-in throws error on hosted UI providers

Open
#792 7 comments 0 reactions 0 assignees View on GitHub
auth bug studio-ui
Dominant language
No language data
Stars
135
Forks
32
PR merge metrics
No merged PRs in 30d

Description

### Before opening, please confirm:

- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-adminui/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-adminui/blob/main/CONTRIBUTING.md#bug-reports).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.

### App Id

d1qbjxyhsg82r

### Region

us-east-1

### Environment name

staging

### Figma File Version (if applicable)

_No response_

### Amplify CLI Version

10.5.2

### If applicable, what version of Node.js are you using?

_No response_

### What operating system are you using?

Mac

### Browser type?

chrome

### Describe the bug

Adding authentication with social sign-in as Apple causes the push to fail.
Passing in private key with `-----BEGIN PRIVATE KEY-----`, `-----END PRIVATE KEY----- ` causes the hosted provider function to fail. The Amplify CLI only accepts the key without the comments.

The cloudwatch logs for callout function throws the following error

```
{
"Status": "FAILED",
"Reason": "See the details in CloudWatch Log Stream: ******",
"PhysicalResourceId": "2022/12/02/[$LATEST]*****",
"StackId": "****",
"RequestId": "7550d102-29fc-4377-b31d-d5759f845fbd",
"LogicalResourceId": "HostedUIProvidersCustomResourceInputs",
"NoEcho": false,
"Data": {
"err": {
"message": "Internal server error.",
"code": "InternalErrorException",
"time": "2022-12-02T10:12:13.234Z",
"requestId": "dbc******",
"statusCode": 500,
"retryable": true
}
}
}
```

refer to https://github.com/aws-amplify/amplify-cli/issues/11526#issuecomment-1379427972 and https://github.com/aws-amplify/amplify-cli/issues/11526#issuecomment-1380952213 for additional information.

### Expected behavior

Validate key the key or parse the key with correct information.

### Reproduction steps

1. select authentication
2. remove email and add phone number as login mechanism
3. add social signin with apple
4. add credentials (i pasted the key in with the -----BEGIN PRIVATE KEY-----) and deploy

### Project Identifier

_No response_

### Additional information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Apple social sign-in deployment from the listed steps and inspect the CloudWatch logs for the HostedUIProvidersCustomResourceInputs callout function. Compare handling of the supplied PEM key with the linked Amplify CLI issue; done means deployment accepts the key with its BEGIN/END markers or reports a clear validation error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
authentication, cloud
Issue type
Bug
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.