amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Add data-credentials support to amp-story bookend component

Open Pateriack opened this issue 7 years ago • 6 comments

Describe the new feature or change to an existing feature you'd like to see

The amp-analytics component supports credentials=include when fetching configuration from a remote url. I would like to see the same functionality added to the amp-story-bookend component. This would allow me to include "related stories" which are personalized to the user.

Describe alternatives you've considered

I've considered (and attempted) using the CLIENT_ID variable substitution to add the client id as a query parameter in the bookend.json url, but my amp page is on a different domain from the domain which serves my bookend and analytics configurations, and a new client id is created on the page's domain.

Additional context

Pateriack avatar Mar 27 '19 13:03 Pateriack

Triaging to @calebcordry , feel free to re-assign.

FYI @newmuis since Caleb is out 😄

torch2424 avatar Mar 28 '19 22:03 torch2424

@zhouyx @jeffjose Do either of you seen any downside to allowing credentials on these requests?

calebcordry avatar Apr 02 '19 17:04 calebcordry

@calebcordry I took a stab at implementing it here https://github.com/ampproject/amphtml/pull/21679.

I assumed based on https://www.ampproject.org/docs/fundamentals/amp-cors-requests#utilizing-cookies-for-cors-requests that it would have been supported.

Pateriack avatar Apr 02 '19 17:04 Pateriack

I don't see an issue with include credentials. But I'm familiar with the the story bookend request. to @newmuis to confirm

zhouyx avatar Apr 03 '19 18:04 zhouyx

Doesn't seem like it would be an issue to me

newmuis avatar Apr 03 '19 19:04 newmuis

Ok sounds good. Thanks all!

calebcordry avatar Apr 03 '19 19:04 calebcordry