https://github.com/groton-school/slim-oauth2-api-proxy-gae-repository
Firestore access token repository for Slim OAuth2 API proxy running on Google App Engine
https://github.com/groton-school/slim-oauth2-api-proxy-gae-repository
api firestore google-app-engine slim-4 slim-framework
Last synced: 5 months ago
JSON representation
Firestore access token repository for Slim OAuth2 API proxy running on Google App Engine
- Host: GitHub
- URL: https://github.com/groton-school/slim-oauth2-api-proxy-gae-repository
- Owner: groton-school
- License: gpl-3.0
- Created: 2025-09-18T19:48:58.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-10-08T17:58:18.000Z (8 months ago)
- Last Synced: 2025-10-19T00:44:52.778Z (8 months ago)
- Topics: api, firestore, google-app-engine, slim-4, slim-framework
- Language: PHP
- Homepage:
- Size: 81.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# groton-school/slim-oauth2-api-proxy-gae-repository
Firestore access token repository for Slim OAuth2 API proxy running on Google App Engine
[](https://packagist.org/packages/groton-school/slim-oauth2-api-proxy-gae-repository)
## Install
```bash
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](https://github.com/groton-school/slim-oauth2-api-proxy#readme), 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`](https://github.com/groton-school/slim-skeleton/blob/df75c2ac2195f74994e9c5e1d5770fd7c2c6807e/src/Application/Middleware/ApiProxyUserIdentifier.php), creating a globally unique user identifier for any given request
2. [Configure `Firestore\AccessTokenRepository` for a given Provider in `dependencies.php`](https://github.com/groton-school/slim-skeleton/blob/df75c2ac2195f74994e9c5e1d5770fd7c2c6807e/app/dependencies.php#L70)
3. [Inject the `AbstractUserIdentifierMiddleware` implementation into the `RouteBuilder::define()` call](https://github.com/groton-school/slim-skeleton/blob/df75c2ac2195f74994e9c5e1d5770fd7c2c6807e/app/routes.php#L23-L28). (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).