groton-school/slim-oauth2-api-proxy-gae-repository

Firestore access token repository for Slim OAuth2 API proxy running on Google App Engine

1.0.1 2025-09-25 14:05 UTC

This package is auto-updated.

Last update: 2025-09-25 15:09:32 UTC


README

Firestore access token repository for Slim OAuth2 API proxy running on Google App Engine

Latest Version

Install

composer require groton-school/oauth2-api-proxy-gae-repository

Use

This is an alternative to the default browser cookie storage for groton-school/oauth2-api-proxy, with the advantage that when used in an embedded context (e.g. an LTI placement) with partitioned cookies, users will not need to reauthorize the API access nearly as frequently.

  1. Implement AbstractUserIdentifierMiddleware, creating a globally unique user identifier for any given request
  2. Configure Firestore\AccessTokenRepository for a given Provider in dependencies.php
  3. Inject the AbstractUserIdentifierMiddleware implementation into the RouteBuilder::define() call. (In the linked example, the ApiProxyUserIdentifier depends on data that must be provided by Authenticated first, and PartitionedSession is invoked last/outer because we are in an embedded LTI placement context).