ampproject / ampproject/amphtml
infinite loop when there are no entitlements
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
This bug is about Extended Access on AMP. I followed [this doc](https://developers.google.com/news/subscribe/extended-access/legacy/integration-steps/amp-implementation) to implement EA on AMP.
What I see is that the extended access registration wall fails to appear. Instead, we get into an infinite loop prior to the registration wall being displayed. The authorizationUrl endpoint I specified in my `amp-subscription` configuration does receive the query and sends a reply.
During an initial discussion/investigation, it seemed like the problem would locate around line 609 of `amp-subscription.js`.
### Reproduction Steps
You can reproduce this bug by visiting https://web-stories-paywall.glitch.me/ and clicking on _Simple [AMP page] with EA_ (or alternatively, just go to: https://play.google.com/newsstand/api/v3/articleaccess?testurl=https://web-stories-paywall.glitch.me/simple_amp.html#log=3&swg.debug=1).
Happy to share access to the Glitch [source code](https://glitch.com/edit/#!/web-stories-paywall?path=public%2Fsimple_amp.html%3A96%3A11).
### Relevant Logs
```shell
I wasn't able to find informative logs.
What I can say is that the authorizationUrl endpoint of my amp-subscription configuration does receive the query and sends a reply.
```
### Browser(s) Affected
_No response_
### OS(s) Affected
_No response_
### Device(s) Affected
_No response_
### AMP Version Affected
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.