adobe / adobe/helix-cli

Authentication flow doesn't work with Safari

Open
#2,498 6 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
68
Forks
72
Avg merge
1d 3h
Merged PRs (30d)
8

Description

**Description**
When running `aem up` with an authenticated site the auth flow never successfully completes if your default browser is safari. When clicking send on the prompt page, an error occurs which is only surfaced via the dev console.

**To Reproduce**
Steps to reproduce the behavior:
1. make safari your default browser (my setup: safari 18.3 on Mac OS 15.3.1)
2. run `aem up` for an authenticated site with no stored site token
3. login with the IdP
4. when you arrive at `https://admin.hlx.page/auth/adobe/ack?code=...` click send
5. note that nothing happens
6. open dev tools console and note the error

**Expected behavior**
The auth flow should complete successfully. If that isn't possible due to some safari specific restriction, the user should see a message with some info on what they can do to work around.

**Screenshots**

errors from console:
```
[Warning] [blocked] The page at https://admin.hlx.page/auth/adobe/ack?code=.... requested insecure content from http://localhost:3000/.aem/cli/login/ack. This content was blocked and must (ack, line 7)

[Error] Not allowed to request resource
(anonymous function) (ack:7)
sendPost (ack:6)
(anonymous function) (ack:23)
[Error] Fetch API cannot load http://localhost:3000/.aem/cli/login/ack due to access control checks.
(anonymous function) (ack:7)
sendPost (ack:6)
(anonymous function) (ack:23)
[Error] Unhandled Promise Rejection: TypeError: Load failed
(anonymous function) (ack:7)
```

**Version:**
```
ssteimer@Seans-M3-Macbook-Pro ups % aem --version
16.10.1
```

Contributor guide

Open the contributing guide

Research direction

Start at the `aem up` authentication flow and the `/auth/adobe/ack` callback described in the issue. Reproduce with Safari using an authenticated site and inspect the console error when the callback targets `http://localhost:3000/.aem/cli/login/ack`. Done means the flow completes successfully, or Safari users receive a clear actionable workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
authentication, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.