Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

Deferred Account Creation Design #8

Open
vderosa opened this issue Apr 14, 2020 · 0 comments
Open

Deferred Account Creation Design #8

vderosa opened this issue Apr 14, 2020 · 0 comments

Comments

@vderosa
Copy link

vderosa commented Apr 14, 2020

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

  1. Check if new endpoints exist on amp-subscription-google configuration.
  2. If yes, call hasAssociatedAccountUrl with granted entitlement.
  3. If hasAssociatedAccountUrl returns false, begin deferred account creation flow.
  4. 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

See: ampproject/amphtml#26649

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant