You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.
hasAssociatedAccountUrl: sends a CORS request with POST payload. The payload contains a single Object ({ entitlements: ...}), which contains a stringified version of the entitlement granted to SubscribeWithGoogle. This URL should return a { found: true|false } message indicating whether a corresponding account exists on the backend.
accountCreationRedirectUrl: a URL the user will be redirected to after giving consent to deferred account creation. This URL should reimplement the deferred account creation flow in swg-js, but can skip the confirmation step.
Flow
Check if new endpoints exist on amp-subscription-google configuration.
If yes, call hasAssociatedAccountUrl with granted entitlement.
If hasAssociatedAccountUrl returns false, begin deferred account creation flow.
If user confirms account creation, redirect to accountCreationRedirectUrl.
The flow can then be continued on the publisher side.
Changes to broader AMP
This design works by implementing pingback on amp-subscription-google. Previously, pingback would only be triggered by AMP for local platform. To make this work, AMP needs to call pingback on all platforms.
This is a proposal to integrate Deferred Account Creation within
amp-subscriptions-google
.New Endpoints
hasAssociatedAccountUrl
: sends a CORS request with POST payload. The payload contains a single Object ({ entitlements: ...}
), which contains a stringified version of the entitlement granted to SubscribeWithGoogle. This URL should return a{ found: true|false }
message indicating whether a corresponding account exists on the backend.accountCreationRedirectUrl
: a URL the user will be redirected to after giving consent to deferred account creation. This URL should reimplement the deferred account creation flow in swg-js, but can skip the confirmation step.Flow
amp-subscription-google
configuration.hasAssociatedAccountUrl
with granted entitlement.hasAssociatedAccountUrl
returns false, begin deferred account creation flow.accountCreationRedirectUrl
.The flow can then be continued on the publisher side.
Changes to broader AMP
This design works by implementing
pingback
onamp-subscription-google
. Previously, pingback would only be triggered by AMP for local platform. To make this work, AMP needs to call pingback on all platforms.Draft Pull Request
See: ampproject/amphtml#26649
The text was updated successfully, but these errors were encountered: