This repository was archived by the owner on Aug 4, 2021. It is now read-only.
This repository was archived by the owner on Aug 4, 2021. It is now read-only.
Deferred Account Creation Design #8
Open
Description
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
- 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.
Draft Pull Request
Metadata
Metadata
Assignees
Labels
No labels