Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data-credentials support for amp-story bookend #21679

Merged

Conversation

Pateriack
Copy link
Contributor

  • Add support for the 'data-credentials' attribute for amp-story bookend.

According to https://www.ampproject.org/docs/fundamentals/amp-cors-requests#utilizing-cookies-for-cors-requests, most components that allow CORS requests allow the developer to optionally set the credentials mode through a 'credentials' or 'data-credentials' attribute. This does not work for amp-story bookend.

Fixes #21598

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@Pateriack Pateriack force-pushed the amp-story-bookend-credentials branch from 6b12cb4 to 8cd4c15 Compare April 2, 2019 15:33
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes and removed cla: no labels Apr 2, 2019
@Pateriack Pateriack marked this pull request as ready for review April 2, 2019 17:38
@Pateriack
Copy link
Contributor Author

/cc @calebcordry @newmuis

Copy link
Member

@calebcordry calebcordry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing. Just a small nit.

credentials = bookendEl.getAttribute(
BOOKEND_CREDENTIALS_ATTRIBUTE_NAME
);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be shortened to const credentials = bookendEl.getAttribute(BOOKEND_CREDENTIALS_ATTRIBUTE_NAME); as it will be null if nonexistent. You may have to change the type below.

Copy link
Member

@calebcordry calebcordry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks again!

@Pateriack
Copy link
Contributor Author

@calebcordry thanks for your input! It appears that one test on saucelabs has failed, and I believe it is unrelated. Could it be flakey tests? Is there any way for me to re-run those tests to see if that is the case?

@calebcordry
Copy link
Member

Sauce labs is non blocking, and probably was a flake. I restarted it just in case. I will merged when it finishes.

@calebcordry calebcordry merged commit b8e790b into ampproject:master Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants