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
Requires
- google/cloud-firestore: ^1.53
- groton-school/slim-oauth2-api-proxy: ^3.0.1
- psr/http-message: ^2.0
Requires (Dev)
README
Firestore access token repository for Slim OAuth2 API proxy running on Google App Engine
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.
- Implement
AbstractUserIdentifierMiddleware
, creating a globally unique user identifier for any given request - Configure
Firestore\AccessTokenRepository
for a given Provider independencies.php
- Inject the
AbstractUserIdentifierMiddleware
implementation into theRouteBuilder::define()
call. (In the linked example, theApiProxyUserIdentifier
depends on data that must be provided byAuthenticated
first, andPartitionedSession
is invoked last/outer because we are in an embedded LTI placement context).