Skip to content

Product Preview: WebView Authentication (self-hosted sites) #8046

@ealeksandrov

Description

@ealeksandrov

We can use a nonce to authenticate the preview request for self-hosted sites. (You can see how WPiOS handles the preview nonce in its PreviewNonceHandler.)

  • When we request the user's sites from the /rest/v1.1/me/sites endpoint, we can add frame_nonce to the list of options in the request.
  • We can save the nonce (a String) in Core Data to use when we need it.
  • When we prepare the preview URL to display in the web view, if the site is self-hosted (not a WordPress.com store) we can add ?frame-nonce={FRAME_NONCE} to the URL.

Metadata

Metadata

Assignees

Labels

feature: product detailsRelated to adding or editing products, including Product Settings.type: taskAn internally driven task.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions