firebase-admin-edge 1.1.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +103 -260
- package/dist/app-check/app-check-endpoints.d.ts +31 -0
- package/dist/app-check/app-check-endpoints.d.ts.map +1 -0
- package/dist/app-check/app-check-endpoints.js +75 -0
- package/dist/app-check/app-check-endpoints.js.map +1 -0
- package/dist/app-check/app-check-jwt.d.ts +16 -0
- package/dist/app-check/app-check-jwt.d.ts.map +1 -0
- package/dist/app-check/app-check-jwt.js +59 -0
- package/dist/app-check/app-check-jwt.js.map +1 -0
- package/dist/app-check/app-check.d.ts +48 -0
- package/dist/app-check/app-check.d.ts.map +1 -0
- package/dist/app-check/app-check.js +142 -0
- package/dist/app-check/app-check.js.map +1 -0
- package/dist/auth/auth-blocking-types.d.ts +44 -0
- package/dist/auth/auth-blocking-types.d.ts.map +1 -0
- package/dist/auth/auth-blocking-types.js +2 -0
- package/dist/auth/auth-blocking-types.js.map +1 -0
- package/dist/auth/auth-config-types.d.ts +146 -0
- package/dist/auth/auth-config-types.d.ts.map +1 -0
- package/dist/auth/auth-config-types.js +2 -0
- package/dist/auth/auth-config-types.js.map +1 -0
- package/dist/auth/auth-config.d.ts +15 -0
- package/dist/auth/auth-config.d.ts.map +1 -0
- package/dist/auth/auth-config.js +413 -0
- package/dist/auth/auth-config.js.map +1 -0
- package/dist/auth/auth-emulator.d.ts +7 -0
- package/dist/auth/auth-emulator.d.ts.map +1 -0
- package/dist/auth/auth-emulator.js +24 -0
- package/dist/auth/auth-emulator.js.map +1 -0
- package/dist/auth/auth-endpoint-errors.d.ts +2 -0
- package/dist/auth/auth-endpoint-errors.d.ts.map +1 -1
- package/dist/auth/auth-endpoint-errors.js +20 -1
- package/dist/auth/auth-endpoint-errors.js.map +1 -1
- package/dist/auth/email-link.d.ts +24 -0
- package/dist/auth/email-link.d.ts.map +1 -0
- package/dist/auth/email-link.js +103 -0
- package/dist/auth/email-link.js.map +1 -0
- package/dist/auth/firebase-admin-auth.d.ts +56 -8
- package/dist/auth/firebase-admin-auth.d.ts.map +1 -1
- package/dist/auth/firebase-admin-auth.js +323 -63
- package/dist/auth/firebase-admin-auth.js.map +1 -1
- package/dist/auth/firebase-auth-endpoints.d.ts +93 -5
- package/dist/auth/firebase-auth-endpoints.d.ts.map +1 -1
- package/dist/auth/firebase-auth-endpoints.js +342 -73
- package/dist/auth/firebase-auth-endpoints.js.map +1 -1
- package/dist/auth/firebase-auth.d.ts +82 -6
- package/dist/auth/firebase-auth.d.ts.map +1 -1
- package/dist/auth/firebase-auth.js +103 -10
- package/dist/auth/firebase-auth.js.map +1 -1
- package/dist/auth/firebase-jwt.d.ts +19 -10
- package/dist/auth/firebase-jwt.d.ts.map +1 -1
- package/dist/auth/firebase-jwt.js +176 -39
- package/dist/auth/firebase-jwt.js.map +1 -1
- package/dist/auth/firebase-types.d.ts +3 -0
- package/dist/auth/firebase-types.d.ts.map +1 -1
- package/dist/auth/google-oauth.d.ts +0 -1
- package/dist/auth/google-oauth.d.ts.map +1 -1
- package/dist/auth/google-oauth.js +16 -86
- package/dist/auth/google-oauth.js.map +1 -1
- package/dist/auth/identity-builder-types.d.ts +36 -0
- package/dist/auth/identity-builder-types.d.ts.map +1 -0
- package/dist/auth/identity-builder-types.js +2 -0
- package/dist/auth/identity-builder-types.js.map +1 -0
- package/dist/auth/identity-count-query.d.ts +17 -0
- package/dist/auth/identity-count-query.d.ts.map +1 -0
- package/dist/auth/identity-count-query.js +51 -0
- package/dist/auth/identity-count-query.js.map +1 -0
- package/dist/auth/identity-filter.d.ts +9 -0
- package/dist/auth/identity-filter.d.ts.map +1 -0
- package/dist/auth/identity-filter.js +129 -0
- package/dist/auth/identity-filter.js.map +1 -0
- package/dist/auth/identity-query.d.ts +11 -0
- package/dist/auth/identity-query.d.ts.map +1 -0
- package/dist/auth/identity-query.js +122 -0
- package/dist/auth/identity-query.js.map +1 -0
- package/dist/auth/identity-reference.d.ts +131 -0
- package/dist/auth/identity-reference.d.ts.map +1 -0
- package/dist/auth/identity-reference.js +293 -0
- package/dist/auth/identity-reference.js.map +1 -0
- package/dist/auth/identity-types.d.ts +44 -0
- package/dist/auth/identity-types.d.ts.map +1 -0
- package/dist/auth/identity-types.js +2 -0
- package/dist/auth/identity-types.js.map +1 -0
- package/dist/auth/identity-write.d.ts +41 -0
- package/dist/auth/identity-write.d.ts.map +1 -0
- package/dist/auth/identity-write.js +146 -0
- package/dist/auth/identity-write.js.map +1 -0
- package/dist/auth/identity.d.ts +84 -0
- package/dist/auth/identity.d.ts.map +1 -0
- package/dist/auth/identity.js +319 -0
- package/dist/auth/identity.js.map +1 -0
- package/dist/auth/project-config-manager.d.ts +10 -0
- package/dist/auth/project-config-manager.d.ts.map +1 -0
- package/dist/auth/project-config-manager.js +22 -0
- package/dist/auth/project-config-manager.js.map +1 -0
- package/dist/auth/provider-credential.d.ts +43 -0
- package/dist/auth/provider-credential.d.ts.map +1 -0
- package/dist/auth/provider-credential.js +107 -0
- package/dist/auth/provider-credential.js.map +1 -0
- package/dist/auth/provider-session.d.ts +10 -0
- package/dist/auth/provider-session.d.ts.map +1 -0
- package/dist/auth/provider-session.js +28 -0
- package/dist/auth/provider-session.js.map +1 -0
- package/dist/auth/tenant-manager.d.ts +17 -0
- package/dist/auth/tenant-manager.d.ts.map +1 -0
- package/dist/auth/tenant-manager.js +59 -0
- package/dist/auth/tenant-manager.js.map +1 -0
- package/dist/auth/user-import.d.ts +7 -1
- package/dist/auth/user-import.d.ts.map +1 -1
- package/dist/auth/user-import.js +53 -15
- package/dist/auth/user-import.js.map +1 -1
- package/dist/auth/user-record.d.ts +1 -0
- package/dist/auth/user-record.d.ts.map +1 -1
- package/dist/auth/user-record.js +5 -0
- package/dist/auth/user-record.js.map +1 -1
- package/dist/auth/user-request.d.ts +4 -1
- package/dist/auth/user-request.d.ts.map +1 -1
- package/dist/auth/user-request.js +7 -4
- package/dist/auth/user-request.js.map +1 -1
- package/dist/db/aggregate.d.ts +49 -0
- package/dist/db/aggregate.d.ts.map +1 -0
- package/dist/db/aggregate.js +115 -0
- package/dist/db/aggregate.js.map +1 -0
- package/dist/db/bulk-writer.d.ts +55 -0
- package/dist/db/bulk-writer.d.ts.map +1 -0
- package/dist/db/bulk-writer.js +257 -0
- package/dist/db/bulk-writer.js.map +1 -0
- package/dist/db/bundle-builder.d.ts +17 -0
- package/dist/db/bundle-builder.d.ts.map +1 -0
- package/dist/db/bundle-builder.js +118 -0
- package/dist/db/bundle-builder.js.map +1 -0
- package/dist/db/bytes.d.ts +12 -0
- package/dist/db/bytes.d.ts.map +1 -0
- package/dist/db/bytes.js +49 -0
- package/dist/db/bytes.js.map +1 -0
- package/dist/db/collection-group.d.ts +14 -0
- package/dist/db/collection-group.d.ts.map +1 -0
- package/dist/db/collection-group.js +43 -0
- package/dist/db/collection-group.js.map +1 -0
- package/dist/db/collection-reference.d.ts +21 -0
- package/dist/db/collection-reference.d.ts.map +1 -0
- package/dist/db/collection-reference.js +46 -0
- package/dist/db/collection-reference.js.map +1 -0
- package/dist/db/document-reference.d.ts +41 -0
- package/dist/db/document-reference.d.ts.map +1 -0
- package/dist/db/document-reference.js +125 -0
- package/dist/db/document-reference.js.map +1 -0
- package/dist/db/document-snapshot.d.ts +31 -0
- package/dist/db/document-snapshot.d.ts.map +1 -0
- package/dist/db/document-snapshot.js +103 -0
- package/dist/db/document-snapshot.js.map +1 -0
- package/dist/db/explain.d.ts +28 -0
- package/dist/db/explain.d.ts.map +1 -0
- package/dist/db/explain.js +61 -0
- package/dist/db/explain.js.map +1 -0
- package/dist/db/field-path.d.ts +10 -0
- package/dist/db/field-path.d.ts.map +1 -0
- package/dist/db/field-path.js +65 -0
- package/dist/db/field-path.js.map +1 -0
- package/dist/db/field-value.d.ts +17 -0
- package/dist/db/field-value.d.ts.map +1 -0
- package/dist/db/field-value.js +57 -0
- package/dist/db/field-value.js.map +1 -0
- package/dist/db/filter.d.ts +20 -0
- package/dist/db/filter.d.ts.map +1 -0
- package/dist/db/filter.js +48 -0
- package/dist/db/filter.js.map +1 -0
- package/dist/db/firestore-converter.d.ts +11 -0
- package/dist/db/firestore-converter.d.ts.map +1 -0
- package/dist/db/firestore-converter.js +14 -0
- package/dist/db/firestore-converter.js.map +1 -0
- package/dist/db/firestore-document.d.ts +62 -0
- package/dist/db/firestore-document.d.ts.map +1 -0
- package/dist/db/firestore-document.js +238 -0
- package/dist/db/firestore-document.js.map +1 -0
- package/dist/db/firestore-endpoints.d.ts +41 -0
- package/dist/db/firestore-endpoints.d.ts.map +1 -0
- package/dist/db/firestore-endpoints.js +735 -0
- package/dist/db/firestore-endpoints.js.map +1 -0
- package/dist/db/firestore-error-codes.d.ts +24 -0
- package/dist/db/firestore-error-codes.d.ts.map +1 -0
- package/dist/db/firestore-error-codes.js +24 -0
- package/dist/db/firestore-error-codes.js.map +1 -0
- package/dist/db/firestore-logging.d.ts +23 -0
- package/dist/db/firestore-logging.d.ts.map +1 -0
- package/dist/db/firestore-logging.js +41 -0
- package/dist/db/firestore-logging.js.map +1 -0
- package/dist/db/firestore-path.d.ts +4 -0
- package/dist/db/firestore-path.d.ts.map +1 -0
- package/dist/db/firestore-path.js +37 -0
- package/dist/db/firestore-path.js.map +1 -0
- package/dist/db/firestore-results.d.ts +12 -0
- package/dist/db/firestore-results.d.ts.map +1 -0
- package/dist/db/firestore-results.js +19 -0
- package/dist/db/firestore-results.js.map +1 -0
- package/dist/db/firestore-settings.d.ts +22 -0
- package/dist/db/firestore-settings.d.ts.map +1 -0
- package/dist/db/firestore-settings.js +83 -0
- package/dist/db/firestore-settings.js.map +1 -0
- package/dist/db/firestore-telemetry.d.ts +21 -0
- package/dist/db/firestore-telemetry.d.ts.map +1 -0
- package/dist/db/firestore-telemetry.js +84 -0
- package/dist/db/firestore-telemetry.js.map +1 -0
- package/dist/db/firestore-types.d.ts +25 -0
- package/dist/db/firestore-types.d.ts.map +1 -0
- package/dist/db/firestore-types.js +2 -0
- package/dist/db/firestore-types.js.map +1 -0
- package/dist/db/firestore.d.ts +157 -0
- package/dist/db/firestore.d.ts.map +1 -0
- package/dist/db/firestore.js +513 -0
- package/dist/db/firestore.js.map +1 -0
- package/dist/db/geo-point.d.ts +11 -0
- package/dist/db/geo-point.d.ts.map +1 -0
- package/dist/db/geo-point.js +29 -0
- package/dist/db/geo-point.js.map +1 -0
- package/dist/db/json-stream.d.ts +3 -0
- package/dist/db/json-stream.d.ts.map +1 -0
- package/dist/db/json-stream.js +117 -0
- package/dist/db/json-stream.js.map +1 -0
- package/dist/db/pipeline-expression.d.ts +293 -0
- package/dist/db/pipeline-expression.d.ts.map +1 -0
- package/dist/db/pipeline-expression.js +1436 -0
- package/dist/db/pipeline-expression.js.map +1 -0
- package/dist/db/pipeline-query.d.ts +6 -0
- package/dist/db/pipeline-query.d.ts.map +1 -0
- package/dist/db/pipeline-query.js +91 -0
- package/dist/db/pipeline-query.js.map +1 -0
- package/dist/db/pipeline.d.ts +120 -0
- package/dist/db/pipeline.d.ts.map +1 -0
- package/dist/db/pipeline.js +396 -0
- package/dist/db/pipeline.js.map +1 -0
- package/dist/db/query-document-snapshot.d.ts +2 -0
- package/dist/db/query-document-snapshot.d.ts.map +1 -0
- package/dist/db/query-document-snapshot.js +2 -0
- package/dist/db/query-document-snapshot.js.map +1 -0
- package/dist/db/query-partition.d.ts +14 -0
- package/dist/db/query-partition.d.ts.map +1 -0
- package/dist/db/query-partition.js +32 -0
- package/dist/db/query-partition.js.map +1 -0
- package/dist/db/query-request.d.ts +96 -0
- package/dist/db/query-request.d.ts.map +1 -0
- package/dist/db/query-request.js +283 -0
- package/dist/db/query-request.js.map +1 -0
- package/dist/db/query.d.ts +129 -0
- package/dist/db/query.d.ts.map +1 -0
- package/dist/db/query.js +468 -0
- package/dist/db/query.js.map +1 -0
- package/dist/db/recursive-delete.d.ts +6 -0
- package/dist/db/recursive-delete.d.ts.map +1 -0
- package/dist/db/recursive-delete.js +38 -0
- package/dist/db/recursive-delete.js.map +1 -0
- package/dist/db/snapshot-listener.d.ts +10 -0
- package/dist/db/snapshot-listener.d.ts.map +1 -0
- package/dist/db/snapshot-listener.js +71 -0
- package/dist/db/snapshot-listener.js.map +1 -0
- package/dist/db/timestamp.d.ts +29 -0
- package/dist/db/timestamp.d.ts.map +1 -0
- package/dist/db/timestamp.js +98 -0
- package/dist/db/timestamp.js.map +1 -0
- package/dist/db/transaction.d.ts +44 -0
- package/dist/db/transaction.d.ts.map +1 -0
- package/dist/db/transaction.js +177 -0
- package/dist/db/transaction.js.map +1 -0
- package/dist/db/value-equality.d.ts +3 -0
- package/dist/db/value-equality.d.ts.map +1 -0
- package/dist/db/value-equality.js +29 -0
- package/dist/db/value-equality.js.map +1 -0
- package/dist/db/vector-query.d.ts +38 -0
- package/dist/db/vector-query.d.ts.map +1 -0
- package/dist/db/vector-query.js +110 -0
- package/dist/db/vector-query.js.map +1 -0
- package/dist/db/vector-value.d.ts +8 -0
- package/dist/db/vector-value.d.ts.map +1 -0
- package/dist/db/vector-value.js +25 -0
- package/dist/db/vector-value.js.map +1 -0
- package/dist/db/write-batch.d.ts +25 -0
- package/dist/db/write-batch.d.ts.map +1 -0
- package/dist/db/write-batch.js +72 -0
- package/dist/db/write-batch.js.map +1 -0
- package/dist/db/write-request.d.ts +36 -0
- package/dist/db/write-request.d.ts.map +1 -0
- package/dist/db/write-request.js +257 -0
- package/dist/db/write-request.js.map +1 -0
- package/dist/firebase-edge-server.d.ts +145 -36
- package/dist/firebase-edge-server.d.ts.map +1 -1
- package/dist/firebase-edge-server.js +495 -258
- package/dist/firebase-edge-server.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/rest-fetch.d.ts +1 -1
- package/dist/rest-fetch.d.ts.map +1 -1
- package/dist/storage/storage-acl.d.ts +48 -0
- package/dist/storage/storage-acl.d.ts.map +1 -0
- package/dist/storage/storage-acl.js +101 -0
- package/dist/storage/storage-acl.js.map +1 -0
- package/dist/storage/storage-bucket-endpoints.d.ts +10 -0
- package/dist/storage/storage-bucket-endpoints.d.ts.map +1 -0
- package/dist/storage/storage-bucket-endpoints.js +514 -0
- package/dist/storage/storage-bucket-endpoints.js.map +1 -0
- package/dist/storage/storage-bucket-types.d.ts +183 -0
- package/dist/storage/storage-bucket-types.d.ts.map +1 -0
- package/dist/storage/storage-bucket-types.js +2 -0
- package/dist/storage/storage-bucket-types.js.map +1 -0
- package/dist/storage/storage-bucket.d.ts +122 -0
- package/dist/storage/storage-bucket.d.ts.map +1 -0
- package/dist/storage/storage-bucket.js +544 -0
- package/dist/storage/storage-bucket.js.map +1 -0
- package/dist/storage/storage-channel.d.ts +10 -0
- package/dist/storage/storage-channel.d.ts.map +1 -0
- package/dist/storage/storage-channel.js +15 -0
- package/dist/storage/storage-channel.js.map +1 -0
- package/dist/storage/storage-checksum.d.ts +35 -0
- package/dist/storage/storage-checksum.d.ts.map +1 -0
- package/dist/storage/storage-checksum.js +312 -0
- package/dist/storage/storage-checksum.js.map +1 -0
- package/dist/storage/storage-endpoints.d.ts +14 -0
- package/dist/storage/storage-endpoints.d.ts.map +1 -0
- package/dist/storage/storage-endpoints.js +721 -0
- package/dist/storage/storage-endpoints.js.map +1 -0
- package/dist/storage/storage-file.d.ts +126 -0
- package/dist/storage/storage-file.d.ts.map +1 -0
- package/dist/storage/storage-file.js +604 -0
- package/dist/storage/storage-file.js.map +1 -0
- package/dist/storage/storage-hmac-key.d.ts +26 -0
- package/dist/storage/storage-hmac-key.d.ts.map +1 -0
- package/dist/storage/storage-hmac-key.js +45 -0
- package/dist/storage/storage-hmac-key.js.map +1 -0
- package/dist/storage/storage-iam.d.ts +20 -0
- package/dist/storage/storage-iam.d.ts.map +1 -0
- package/dist/storage/storage-iam.js +43 -0
- package/dist/storage/storage-iam.js.map +1 -0
- package/dist/storage/storage-md5.d.ts +11 -0
- package/dist/storage/storage-md5.d.ts.map +1 -0
- package/dist/storage/storage-md5.js +96 -0
- package/dist/storage/storage-md5.js.map +1 -0
- package/dist/storage/storage-notification.d.ts +24 -0
- package/dist/storage/storage-notification.d.ts.map +1 -0
- package/dist/storage/storage-notification.js +40 -0
- package/dist/storage/storage-notification.js.map +1 -0
- package/dist/storage/storage-progress.d.ts +4 -0
- package/dist/storage/storage-progress.d.ts.map +1 -0
- package/dist/storage/storage-progress.js +17 -0
- package/dist/storage/storage-progress.js.map +1 -0
- package/dist/storage/storage-reference-endpoints.d.ts +63 -0
- package/dist/storage/storage-reference-endpoints.d.ts.map +1 -0
- package/dist/storage/storage-reference-endpoints.js +276 -0
- package/dist/storage/storage-reference-endpoints.js.map +1 -0
- package/dist/storage/storage-reference-helpers.d.ts +12 -0
- package/dist/storage/storage-reference-helpers.d.ts.map +1 -0
- package/dist/storage/storage-reference-helpers.js +72 -0
- package/dist/storage/storage-reference-helpers.js.map +1 -0
- package/dist/storage/storage-reference-signing.d.ts +40 -0
- package/dist/storage/storage-reference-signing.d.ts.map +1 -0
- package/dist/storage/storage-reference-signing.js +289 -0
- package/dist/storage/storage-reference-signing.js.map +1 -0
- package/dist/storage/storage-reference-types.d.ts +76 -0
- package/dist/storage/storage-reference-types.d.ts.map +1 -0
- package/dist/storage/storage-reference-types.js +2 -0
- package/dist/storage/storage-reference-types.js.map +1 -0
- package/dist/storage/storage-results.d.ts +8 -0
- package/dist/storage/storage-results.d.ts.map +1 -0
- package/dist/storage/storage-results.js +32 -0
- package/dist/storage/storage-results.js.map +1 -0
- package/dist/storage/storage-resumable.d.ts +18 -0
- package/dist/storage/storage-resumable.d.ts.map +1 -0
- package/dist/storage/storage-resumable.js +166 -0
- package/dist/storage/storage-resumable.js.map +1 -0
- package/dist/storage/storage-retry.d.ts +9 -0
- package/dist/storage/storage-retry.d.ts.map +1 -0
- package/dist/storage/storage-retry.js +104 -0
- package/dist/storage/storage-retry.js.map +1 -0
- package/dist/storage/storage-signed-url.d.ts +9 -0
- package/dist/storage/storage-signed-url.d.ts.map +1 -0
- package/dist/storage/storage-signed-url.js +96 -0
- package/dist/storage/storage-signed-url.js.map +1 -0
- package/dist/storage/storage-special-endpoints.d.ts +10 -0
- package/dist/storage/storage-special-endpoints.d.ts.map +1 -0
- package/dist/storage/storage-special-endpoints.js +394 -0
- package/dist/storage/storage-special-endpoints.js.map +1 -0
- package/dist/storage/storage-special-types.d.ts +154 -0
- package/dist/storage/storage-special-types.d.ts.map +1 -0
- package/dist/storage/storage-special-types.js +2 -0
- package/dist/storage/storage-special-types.js.map +1 -0
- package/dist/storage/storage-types.d.ts +251 -0
- package/dist/storage/storage-types.d.ts.map +1 -0
- package/dist/storage/storage-types.js +2 -0
- package/dist/storage/storage-types.js.map +1 -0
- package/dist/storage/storage-upload-stream.d.ts +41 -0
- package/dist/storage/storage-upload-stream.d.ts.map +1 -0
- package/dist/storage/storage-upload-stream.js +335 -0
- package/dist/storage/storage-upload-stream.js.map +1 -0
- package/dist/storage/storage-xml-signing.d.ts +17 -0
- package/dist/storage/storage-xml-signing.d.ts.map +1 -0
- package/dist/storage/storage-xml-signing.js +144 -0
- package/dist/storage/storage-xml-signing.js.map +1 -0
- package/dist/storage/storage.d.ts +159 -0
- package/dist/storage/storage.d.ts.map +1 -0
- package/dist/storage/storage.js +545 -0
- package/dist/storage/storage.js.map +1 -0
- package/dist/utils/token-cache.d.ts.map +1 -1
- package/dist/utils/token-cache.js +3 -2
- package/dist/utils/token-cache.js.map +1 -1
- package/package.json +24 -8
- package/dist/auth/auth-endpoint-errors.test.d.ts +0 -2
- package/dist/auth/auth-endpoint-errors.test.d.ts.map +0 -1
- package/dist/auth/auth-endpoint-errors.test.js +0 -411
- package/dist/auth/auth-endpoint-errors.test.js.map +0 -1
- package/dist/auth/email-action-request.test.d.ts +0 -2
- package/dist/auth/email-action-request.test.d.ts.map +0 -1
- package/dist/auth/email-action-request.test.js +0 -128
- package/dist/auth/email-action-request.test.js.map +0 -1
- package/dist/auth/errors.test.d.ts +0 -2
- package/dist/auth/errors.test.d.ts.map +0 -1
- package/dist/auth/errors.test.js +0 -123
- package/dist/auth/errors.test.js.map +0 -1
- package/dist/auth/firebase-admin-auth.test.d.ts +0 -2
- package/dist/auth/firebase-admin-auth.test.d.ts.map +0 -1
- package/dist/auth/firebase-admin-auth.test.js +0 -1542
- package/dist/auth/firebase-admin-auth.test.js.map +0 -1
- package/dist/auth/firebase-auth-endpoints.test.d.ts +0 -2
- package/dist/auth/firebase-auth-endpoints.test.d.ts.map +0 -1
- package/dist/auth/firebase-auth-endpoints.test.js +0 -1082
- package/dist/auth/firebase-auth-endpoints.test.js.map +0 -1
- package/dist/auth/firebase-auth.test.d.ts +0 -2
- package/dist/auth/firebase-auth.test.d.ts.map +0 -1
- package/dist/auth/firebase-auth.test.js +0 -167
- package/dist/auth/firebase-auth.test.js.map +0 -1
- package/dist/auth/firebase-jwt.test.d.ts +0 -2
- package/dist/auth/firebase-jwt.test.d.ts.map +0 -1
- package/dist/auth/firebase-jwt.test.js +0 -164
- package/dist/auth/firebase-jwt.test.js.map +0 -1
- package/dist/auth/github-oauth.d.ts +0 -19
- package/dist/auth/github-oauth.d.ts.map +0 -1
- package/dist/auth/github-oauth.js +0 -145
- package/dist/auth/github-oauth.js.map +0 -1
- package/dist/auth/github-oauth.test.d.ts +0 -2
- package/dist/auth/github-oauth.test.d.ts.map +0 -1
- package/dist/auth/github-oauth.test.js +0 -202
- package/dist/auth/github-oauth.test.js.map +0 -1
- package/dist/auth/google-oauth.test.d.ts +0 -2
- package/dist/auth/google-oauth.test.d.ts.map +0 -1
- package/dist/auth/google-oauth.test.js +0 -200
- package/dist/auth/google-oauth.test.js.map +0 -1
- package/dist/auth/oauth.d.ts +0 -3
- package/dist/auth/oauth.d.ts.map +0 -1
- package/dist/auth/oauth.js +0 -48
- package/dist/auth/oauth.js.map +0 -1
- package/dist/auth/oauth.test.d.ts +0 -2
- package/dist/auth/oauth.test.d.ts.map +0 -1
- package/dist/auth/oauth.test.js +0 -109
- package/dist/auth/oauth.test.js.map +0 -1
- package/dist/auth/user-batch.test.d.ts +0 -2
- package/dist/auth/user-batch.test.d.ts.map +0 -1
- package/dist/auth/user-batch.test.js +0 -73
- package/dist/auth/user-batch.test.js.map +0 -1
- package/dist/auth/user-import.test.d.ts +0 -2
- package/dist/auth/user-import.test.d.ts.map +0 -1
- package/dist/auth/user-import.test.js +0 -217
- package/dist/auth/user-import.test.js.map +0 -1
- package/dist/auth/user-record.test.d.ts +0 -2
- package/dist/auth/user-record.test.d.ts.map +0 -1
- package/dist/auth/user-record.test.js +0 -198
- package/dist/auth/user-record.test.js.map +0 -1
- package/dist/auth/user-request.test.d.ts +0 -2
- package/dist/auth/user-request.test.d.ts.map +0 -1
- package/dist/auth/user-request.test.js +0 -327
- package/dist/auth/user-request.test.js.map +0 -1
- package/dist/firebase-edge-errors.test.d.ts +0 -2
- package/dist/firebase-edge-errors.test.d.ts.map +0 -1
- package/dist/firebase-edge-errors.test.js +0 -72
- package/dist/firebase-edge-errors.test.js.map +0 -1
- package/dist/firebase-edge-server.test.d.ts +0 -2
- package/dist/firebase-edge-server.test.d.ts.map +0 -1
- package/dist/firebase-edge-server.test.js +0 -293
- package/dist/firebase-edge-server.test.js.map +0 -1
- package/dist/rest-fetch.test.d.ts +0 -2
- package/dist/rest-fetch.test.d.ts.map +0 -1
- package/dist/rest-fetch.test.js +0 -164
- package/dist/rest-fetch.test.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,45 +1,56 @@
|
|
|
1
1
|
# Firebase Admin Edge
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
and verification.
|
|
3
|
+
Use Firebase Authentication, Firestore, Cloud Storage, and App Check from your
|
|
4
|
+
server or edge runtime. `firebase-admin-edge` is a TypeScript library built on
|
|
5
|
+
Firebase REST APIs, standard web APIs, and `jose` for token signing and verification.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- Vercel Edge
|
|
10
|
-
- Cloudflare Workers
|
|
11
|
-
- Deno (Edge)
|
|
12
|
-
- Bun
|
|
13
|
-
- Node.js
|
|
7
|
+
Designed for Cloudflare Workers, Vercel Edge, Deno, Bun, and Node.js. Bring your
|
|
8
|
+
framework's cookie helpers to connect authentication to your app.
|
|
14
9
|
|
|
15
10
|
## Contents
|
|
16
11
|
|
|
17
|
-
- [Setup](#setup)
|
|
18
|
-
- [Sign in](#sign-in)
|
|
19
|
-
- [Users and sessions](#users-and-sessions)
|
|
20
|
-
- [Link and unlink accounts](#link-and-unlink-accounts)
|
|
21
|
-
- [All server methods](#all-server-methods)
|
|
22
|
-
- [Auth classes](#auth-classes)
|
|
23
12
|
- [Features](#features)
|
|
24
|
-
- [
|
|
13
|
+
- [Installation](#installation)
|
|
14
|
+
- [Setup](#setup)
|
|
15
|
+
- [Demo](#demo)
|
|
16
|
+
- [Class Guides](#class-guides)
|
|
17
|
+
- [Auth Emulator](#auth-emulator)
|
|
18
|
+
- [Compatibility](#compatibility)
|
|
19
|
+
- [Contributing and Reporting Issues](#contributing-and-reporting-issues)
|
|
20
|
+
- [License](#license)
|
|
21
|
+
|
|
22
|
+
## Features
|
|
23
|
+
|
|
24
|
+
- **Authentication:** Provider sign-in, magic links, session cookies, account
|
|
25
|
+
linking, and password reset flows.
|
|
26
|
+
- **User Administration:** Manage users, verify tokens, and configure projects
|
|
27
|
+
and authentication tenants.
|
|
28
|
+
- **Firestore:** Read and write documents, query collections, and use
|
|
29
|
+
transactions, batches, and document converters.
|
|
30
|
+
- **Cloud Storage:** Manage buckets and files, stream uploads and downloads,
|
|
31
|
+
and create signed URLs.
|
|
32
|
+
- **App Check:** Create and verify tokens, with replay protection support.
|
|
33
|
+
- **TypeScript:** Typed APIs with configurable cookies, token caching, and fetch.
|
|
25
34
|
|
|
26
35
|
## Installation
|
|
27
36
|
|
|
28
|
-
```
|
|
29
|
-
npm
|
|
37
|
+
```sh
|
|
38
|
+
npm install firebase-admin-edge
|
|
30
39
|
```
|
|
31
40
|
|
|
32
41
|
## Setup
|
|
33
42
|
|
|
34
|
-
|
|
35
|
-
|
|
43
|
+
You'll need a Firebase project, its web app configuration, and a service account.
|
|
44
|
+
Load the service account from your server's secret storage; keep it out of browser
|
|
45
|
+
code and source control.
|
|
46
|
+
|
|
47
|
+
Create the server API with cookie helpers for the current request. In this
|
|
48
|
+
example, `serviceAccount` is your loaded service-account object, and `getCookie`
|
|
49
|
+
and `setCookie` are supplied by your framework:
|
|
36
50
|
|
|
37
|
-
```
|
|
51
|
+
```ts
|
|
38
52
|
import { createFirebaseEdgeServer } from 'firebase-admin-edge';
|
|
39
|
-
import { getCookie, setCookie } from 'your-framework-library';
|
|
40
53
|
|
|
41
|
-
// Load serviceAccount and client secrets from your server's secrets.
|
|
42
|
-
// Cookie helpers must read and write cookies for the current request.
|
|
43
54
|
const firebaseServer = createFirebaseEdgeServer({
|
|
44
55
|
serviceAccount,
|
|
45
56
|
firebaseConfig: {
|
|
@@ -47,272 +58,104 @@ const firebaseServer = createFirebaseEdgeServer({
|
|
|
47
58
|
authDomain: 'your-project.firebaseapp.com',
|
|
48
59
|
projectId: 'your-project-id'
|
|
49
60
|
},
|
|
50
|
-
providers: {
|
|
51
|
-
google: {
|
|
52
|
-
client_id: 'your-google-oauth-client-id',
|
|
53
|
-
client_secret: 'your-google-oauth-client-secret'
|
|
54
|
-
},
|
|
55
|
-
github: {
|
|
56
|
-
client_id: 'your-github-oauth-client-id',
|
|
57
|
-
client_secret: 'your-github-oauth-client-secret'
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
61
|
cookies: {
|
|
61
|
-
// Provide your framework's cookie helpers
|
|
62
62
|
getSession: (name) => getCookie(name),
|
|
63
63
|
saveSession: (name, value, options) => setCookie(name, value, options)
|
|
64
64
|
},
|
|
65
|
-
|
|
66
|
-
cookieName: '__session',
|
|
67
|
-
// Optional: Custom cookie options
|
|
68
|
-
cookieOptions: {
|
|
69
|
-
httpOnly: true,
|
|
70
|
-
secure: true,
|
|
71
|
-
sameSite: 'lax',
|
|
72
|
-
path: '/',
|
|
73
|
-
maxAge: 60 * 60 * 24 * 5 // 5 days
|
|
74
|
-
},
|
|
75
|
-
// OAuth callback URL (registered with your provider)
|
|
76
|
-
redirectUri: 'https://example.com/auth/callback',
|
|
77
|
-
// Optional: Tenant ID for multi-tenancy
|
|
78
|
-
tenantId: 'your-tenant-id',
|
|
79
|
-
// Optional: Automatically link accounts with same email
|
|
80
|
-
autoLinkProviders: false
|
|
65
|
+
redirectUri: 'https://example.com/auth/callback'
|
|
81
66
|
});
|
|
82
67
|
```
|
|
83
68
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
Optional settings:
|
|
89
|
-
|
|
90
|
-
| Setting | Purpose |
|
|
91
|
-
| -------------------- | ------------------------------------------------------------------------------------------- |
|
|
92
|
-
| `cookieName` | Session cookie name. Defaults to `__session`. |
|
|
93
|
-
| `cookieOptions` | Cookie settings. Defaults to secure, HTTP-only, `sameSite: 'lax'`, path `/`, and five days. |
|
|
94
|
-
| `tenantId` | Select a Firebase Auth tenant. |
|
|
95
|
-
| `autoLinkProviders` | Try to link accounts with the same email. Defaults to off. |
|
|
96
|
-
| `fetch` | Supply your own HTTP request function. |
|
|
97
|
-
| `cache`, `cacheName` | Supply token cache callbacks and a cache key. See [TokenCache](TOKEN_CACHE.md). |
|
|
98
|
-
|
|
99
|
-
## Sign in
|
|
100
|
-
|
|
101
|
-
### 1. Send the user to Google or GitHub
|
|
69
|
+
To start Google sign-in, enable Google in Firebase Console and authorize your
|
|
70
|
+
app's domain. Use HTTPS for the login and callback routes so the authentication
|
|
71
|
+
cookies can be sent.
|
|
102
72
|
|
|
103
73
|
```ts
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
// Generate provider-specific login URLs (server uses configured redirectUri)
|
|
109
|
-
const loginUrlGoogle = await firebaseServer.getGoogleLoginURL(next);
|
|
110
|
-
const loginUrlGithub = await firebaseServer.getGitHubLoginURL(next);
|
|
111
|
-
|
|
112
|
-
// Redirect the user to the provider's login page
|
|
113
|
-
redirect(302, loginUrlGoogle);
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
These login methods clear the current session. Both accept an optional second
|
|
117
|
-
argument with `customParameters` and `addScopes`. Google also accepts
|
|
118
|
-
`languageCode`.
|
|
119
|
-
|
|
120
|
-
### 2. Handle the callback
|
|
121
|
-
|
|
122
|
-
The callback completes sign-in, saves the session cookie, and returns the path to
|
|
123
|
-
send the user back to.
|
|
124
|
-
|
|
125
|
-
```ts
|
|
126
|
-
const { data: returnTo, error } = await firebaseServer.signInWithCallback(
|
|
127
|
-
new URL(request.url)
|
|
74
|
+
const loginURL = await firebaseServer.getProviderLoginURL(
|
|
75
|
+
'google',
|
|
76
|
+
'/dashboard'
|
|
128
77
|
);
|
|
129
|
-
|
|
130
|
-
if (error) {
|
|
131
|
-
throw error;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
redirect(302, returnTo || '/');
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
## Users and sessions
|
|
138
|
-
|
|
139
|
-
### Get the signed-in user
|
|
140
|
-
|
|
141
|
-
```ts
|
|
142
|
-
const { data: user, error } = await firebaseServer.getUser();
|
|
143
|
-
|
|
144
|
-
if (error) {
|
|
145
|
-
throw error;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// user is null when there is no session. user.sub is the Firebase user ID.
|
|
78
|
+
// Redirect to loginURL using your framework.
|
|
149
79
|
```
|
|
150
80
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
Use this when you need a Firebase ID token and refresh token for the current user.
|
|
81
|
+
Your callback route completes sign-in and saves the session cookie. Follow the
|
|
82
|
+
[provider callback guide](docs/FIREBASE_EDGE_SERVER.md#provider-login-and-linking)
|
|
83
|
+
for the route implementation, or use the [demo](app-demo/README.md) as a working
|
|
84
|
+
example.
|
|
157
85
|
|
|
158
|
-
|
|
159
|
-
|
|
86
|
+
The same server object exposes `auth`, `adminAuth`, `firestore`, `storage`, and
|
|
87
|
+
`appCheck`. See the [server guide](docs/FIREBASE_EDGE_SERVER.md) for configuration,
|
|
88
|
+
providers, session handling, and examples. For Storage, also set
|
|
89
|
+
`firebaseConfig.storageBucket` to your bucket name.
|
|
160
90
|
|
|
161
|
-
|
|
162
|
-
throw error;
|
|
163
|
-
}
|
|
91
|
+
## Demo
|
|
164
92
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
93
|
+
The [SvelteKit demo](app-demo/README.md) shows Google and GitHub sign-in, magic
|
|
94
|
+
links, password resets, account linking, and Firestore reads. Its README covers
|
|
95
|
+
local setup and the required Firebase configuration.
|
|
168
96
|
|
|
169
|
-
|
|
97
|
+
## Class Guides
|
|
170
98
|
|
|
171
|
-
|
|
172
|
-
firebaseServer.signOut();
|
|
173
|
-
redirect(302, '/');
|
|
174
|
-
```
|
|
99
|
+
Start with the guide for the feature you're adding:
|
|
175
100
|
|
|
176
|
-
|
|
101
|
+
For fluent Firebase Auth user queries, see [Identity](docs/IDENTITY.md).
|
|
177
102
|
|
|
178
|
-
|
|
103
|
+
| Guide | What It Covers |
|
|
104
|
+
| ------------------------------------------------------------------------------ | ---------------------------------------------------------- |
|
|
105
|
+
| [Firebase Edge Server](docs/FIREBASE_EDGE_SERVER.md) | App setup, sign-in, callbacks, and sessions |
|
|
106
|
+
| [FirebaseAdminAuth](docs/FIREBASE_ADMIN_AUTH.md) | User management, token verification, and session cookies |
|
|
107
|
+
| [FirebaseAuth](docs/FIREBASE_AUTH.md) | Authentication operations and provider credentials |
|
|
108
|
+
| [Firestore](docs/FIRESTORE.md) | Documents, queries, transactions, and related class guides |
|
|
109
|
+
| [Storage](docs/STORAGE.md), [Bucket](docs/BUCKET.md), and [File](docs/FILE.md) | File transfers, signed URLs, and bucket administration |
|
|
110
|
+
| [AppCheck](docs/APP_CHECK.md) | Token creation, verification, and replay protection |
|
|
111
|
+
| [ProjectConfigManager](docs/PROJECT_CONFIG_MANAGER.md) | Project authentication settings |
|
|
112
|
+
| [TenantManager](docs/TENANT_MANAGER.md) | Tenant management and authentication |
|
|
113
|
+
| [TokenCache](docs/TOKEN_CACHE.md) | In-memory token caching |
|
|
114
|
+
| [FirebaseEdgeError](docs/FIREBASE_EDGE_ERROR.md) | Error codes, causes, and context |
|
|
179
115
|
|
|
180
|
-
|
|
116
|
+
See [Standalone Functions](docs/FUNCTIONS.md) for the function reference and
|
|
117
|
+
[Integration Testing](docs/INTEGRATION_TESTING.md) for local runtime checks and
|
|
118
|
+
live Firebase tests.
|
|
181
119
|
|
|
182
|
-
|
|
183
|
-
in [Sign in](#2-handle-the-callback).
|
|
120
|
+
## Auth Emulator
|
|
184
121
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
const linkURL = await firebaseServer.getGoogleLinkURL(next);
|
|
189
|
-
// or: linkURL = await firebaseServer.getGitHubLinkURL(next);
|
|
190
|
-
redirect(302, linkURL);
|
|
191
|
-
```
|
|
122
|
+
For local authentication development, follow the
|
|
123
|
+
[Auth Emulator setup](docs/FIREBASE_EDGE_SERVER.md#auth-emulator). The guide covers
|
|
124
|
+
configuration and how emulator behavior differs from production.
|
|
192
125
|
|
|
193
|
-
|
|
126
|
+
## Compatibility
|
|
194
127
|
|
|
195
|
-
|
|
196
|
-
|
|
128
|
+
This package provides its own REST-based API and error conventions; it is not a
|
|
129
|
+
drop-in replacement for the Firebase Admin Node.js SDK. Check the guides when
|
|
130
|
+
porting existing code, especially for `{ error, data }` results and Web Streams.
|
|
197
131
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
132
|
+
The [Firestore parity audit](docs/FIRESTORE_PARITY.md) and
|
|
133
|
+
[Storage compatibility checklist](docs/STORAGE_PARITY.md) describe the compared
|
|
134
|
+
API surfaces and runtime differences. The
|
|
135
|
+
[integration testing guide](docs/INTEGRATION_TESTING.md) documents the runtime
|
|
136
|
+
checks and their scope.
|
|
203
137
|
|
|
204
|
-
|
|
205
|
-
throw error;
|
|
206
|
-
}
|
|
207
|
-
```
|
|
138
|
+
## Contributing and Reporting Issues
|
|
208
139
|
|
|
209
|
-
|
|
140
|
+
Contributions are welcome! Open a pull request with bug fixes, improvements, or
|
|
141
|
+
documentation updates. For code changes, include relevant tests and usage examples.
|
|
210
142
|
|
|
211
|
-
|
|
212
|
-
const { error } = await firebaseServer.unlinkProvider('google.com');
|
|
143
|
+
To get started locally:
|
|
213
144
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
145
|
+
```sh
|
|
146
|
+
npm install
|
|
147
|
+
npm run ci
|
|
217
148
|
```
|
|
218
149
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
| Method | What it does |
|
|
224
|
-
| ------------------------------------------ | --------------------------------------------------- |
|
|
225
|
-
| `getGoogleLoginURL(next, options?)` | Builds a Google login URL. |
|
|
226
|
-
| `getGitHubLoginURL(next, options?)` | Builds a GitHub login URL. |
|
|
227
|
-
| `signInWithCallback(url, expiresInMs?)` | Completes login or linking and saves the session. |
|
|
228
|
-
| `getUser(checkRevoked?)` | Reads and checks the current session. |
|
|
229
|
-
| `getToken()` | Creates Firebase login tokens for the current user. |
|
|
230
|
-
| `signOut()` | Clears the session cookie. |
|
|
231
|
-
| `getGoogleLinkURL(next, options?)` | Builds a Google account linking URL. |
|
|
232
|
-
| `getGitHubLinkURL(next, options?)` | Builds a GitHub account linking URL. |
|
|
233
|
-
| `linkProvider(providerToken, providerId)` | Links a provider using its token. |
|
|
234
|
-
| `unlinkProvider(providerId, expiresInMs?)` | Removes a provider and replaces the session cookie. |
|
|
235
|
-
|
|
236
|
-
URL methods return a string and can throw errors. `signOut()` returns nothing.
|
|
237
|
-
The other methods return a result with `data` and/or `error`; check `error` first.
|
|
238
|
-
Session durations are in milliseconds and default to five days.
|
|
239
|
-
|
|
240
|
-
`getUser(true)` also looks up the user and rejects disabled accounts or sessions
|
|
241
|
-
authenticated before the user's refresh tokens were revoked. See the
|
|
242
|
-
[session verification details](FIREBASE_ADMIN_AUTH.md#sessions).
|
|
243
|
-
|
|
244
|
-
## Auth classes
|
|
245
|
-
|
|
246
|
-
The server exposes configured instances of the two auth classes:
|
|
247
|
-
|
|
248
|
-
| Property | Class guide |
|
|
249
|
-
| -------------------------- | ----------------------------------------------------------------------------------- |
|
|
250
|
-
| `firebaseServer.auth` | [FirebaseAuth](FIREBASE_AUTH.md): sign-in and provider linking. |
|
|
251
|
-
| `firebaseServer.adminAuth` | [FirebaseAdminAuth](FIREBASE_ADMIN_AUTH.md): user management, tokens, and sessions. |
|
|
252
|
-
|
|
253
|
-
## Class guides
|
|
254
|
-
|
|
255
|
-
Each class has its own guide:
|
|
256
|
-
|
|
257
|
-
- [FirebaseAdminAuth](FIREBASE_ADMIN_AUTH.md): user management, tokens, and sessions.
|
|
258
|
-
- [FirebaseAuth](FIREBASE_AUTH.md): sign-in and provider linking.
|
|
259
|
-
- [TokenCache](TOKEN_CACHE.md): in-memory caching.
|
|
260
|
-
- [FirebaseEdgeError](FIREBASE_EDGE_ERROR.md): error codes, causes, and context.
|
|
261
|
-
|
|
262
|
-
See [Standalone functions](FUNCTIONS.md) for the function reference.
|
|
263
|
-
|
|
264
|
-
## Features
|
|
265
|
-
|
|
266
|
-
- ✅ **Edge Runtime Compatible** - Works in Vercel Edge, Cloudflare Workers, Deno, and Bun
|
|
267
|
-
- ✅ **Lightweight** - Uses the fetch API and jose
|
|
268
|
-
- ✅ **TypeScript Support** - Full type safety and IntelliSense
|
|
269
|
-
- ✅ **Session Management** - Secure HTTP-only cookies
|
|
270
|
-
- ✅ **OAuth Support** - Google and GitHub OAuth 2.0 flows
|
|
271
|
-
- ✅ **Token Management** - Generate client tokens from server sessions
|
|
272
|
-
- ✅ **Token Caching** - Optional caching for service account tokens (1-hour TTL)
|
|
273
|
-
- ✅ **Multi-Tenancy** - Support for Firebase Auth tenant IDs
|
|
274
|
-
- ✅ **Flexible Configuration** - Customizable cookie options and cache implementations
|
|
275
|
-
- ✅ **Link and Unlink Providers** - Link and unlink oauth providers
|
|
276
|
-
|
|
277
|
-
## Planned work
|
|
278
|
-
|
|
279
|
-
Completed admin capabilities are marked below. End-to-end login and account
|
|
280
|
-
flows through the main server API are tracked separately.
|
|
281
|
-
|
|
282
|
-
### Firebase Auth
|
|
283
|
-
|
|
284
|
-
- ☐ Magic Link Login (auto save email option)
|
|
285
|
-
- ☐ Email / Password / Annonymous Login
|
|
286
|
-
- ☐ Reset Password Flow (email delivery and completion)
|
|
287
|
-
- ☐ Self-Service Change Email Flow
|
|
288
|
-
- ☐ Custom User Listing Order By (queryUsers)
|
|
289
|
-
- ☐ Add All Providers
|
|
290
|
-
- ☐ Add App Check
|
|
291
|
-
- ☐ RBAC
|
|
292
|
-
|
|
293
|
-
### OIDC / SAML provider configuration
|
|
294
|
-
|
|
295
|
-
- ☐ Create Provider Config (`adminAuth.createProviderConfig()`)
|
|
296
|
-
- ☐ Get Provider Config (`adminAuth.getProviderConfig()`)
|
|
297
|
-
- ☐ Update Provider Config (`adminAuth.updateProviderConfig()`)
|
|
298
|
-
- ☐ Delete Provider Config (`adminAuth.deleteProviderConfig()`)
|
|
299
|
-
- ☐ List Provider Configs (`adminAuth.listProviderConfigs()`)
|
|
300
|
-
|
|
301
|
-
### Project / tenant management
|
|
302
|
-
|
|
303
|
-
- ☐ Project Config Manager (`adminAuth.projectConfigManager()`)
|
|
304
|
-
- ☐ Tenant Manager (`adminAuth.tenantManager()`)
|
|
305
|
-
|
|
306
|
-
### Firestore
|
|
150
|
+
`npm run ci` builds the package, checks formatting, and runs the unit tests. See
|
|
151
|
+
[Integration Testing](docs/INTEGRATION_TESTING.md) for checks that need a Firebase
|
|
152
|
+
project or additional runtime tooling.
|
|
307
153
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
- ☐ Query Documents
|
|
154
|
+
If you run into a problem or have a feature request,
|
|
155
|
+
[open a GitHub issue](https://github.com/jdgamble555/firebase-admin-edge/issues).
|
|
156
|
+
For bugs, include your package version, runtime, steps to reproduce, and relevant
|
|
157
|
+
error messages. A small reproduction helps others investigate.
|
|
313
158
|
|
|
314
|
-
|
|
159
|
+
## License
|
|
315
160
|
|
|
316
|
-
|
|
317
|
-
- ☐ Delete File
|
|
318
|
-
- ☐ Get File
|
|
161
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** @internal A reusable resolver with bounded caching and key rotation. */
|
|
2
|
+
export declare function createAppCheckKeyResolver(fetch: typeof globalThis.fetch): {
|
|
3
|
+
(protectedHeader?: import("jose").JWSHeaderParameters, token?: import("jose").FlattenedJWSInput): Promise<import("jose").CryptoKey>;
|
|
4
|
+
coolingDown: boolean;
|
|
5
|
+
fresh: boolean;
|
|
6
|
+
reloading: boolean;
|
|
7
|
+
reload: () => Promise<void>;
|
|
8
|
+
jwks: () => import("jose").JSONWebKeySet | undefined;
|
|
9
|
+
};
|
|
10
|
+
/** @internal Authenticated App Check operations. */
|
|
11
|
+
export declare function appCheckRequest(projectId: string, accessToken: string, operation: {
|
|
12
|
+
appId: string;
|
|
13
|
+
customToken: string;
|
|
14
|
+
limitedUse?: boolean;
|
|
15
|
+
jti?: string;
|
|
16
|
+
} | {
|
|
17
|
+
token: string;
|
|
18
|
+
}, fetch: typeof globalThis.fetch): Promise<{
|
|
19
|
+
token?: string;
|
|
20
|
+
ttl?: string;
|
|
21
|
+
alreadyConsumed?: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
/** @internal Convert the exchange response's protobuf duration. */
|
|
24
|
+
export declare function parseAppCheckToken(data: {
|
|
25
|
+
token?: string;
|
|
26
|
+
ttl?: string;
|
|
27
|
+
}): {
|
|
28
|
+
token: string;
|
|
29
|
+
ttlMillis: number;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=app-check-endpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-check-endpoints.d.ts","sourceRoot":"","sources":["../../src/app-check/app-check-endpoints.ts"],"names":[],"mappings":"AAIA,2EAA2E;AAC3E,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,UAAU,CAAC,KAAK;;;;;;;EAOvE;AAED,oDAAoD;AACpD,wBAAsB,eAAe,CACjC,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,SAAS,EACH;IACI,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB,GACD;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,EACvB,KAAK,EAAE,OAAO,UAAU,CAAC,KAAK;YAQhB,MAAM;UAAQ,MAAM;sBAAoB,OAAO;GAyChE;AAED,mEAAmE;AACnE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE;;;EAoBxE"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { createRemoteJWKSet, customFetch } from 'jose';
|
|
2
|
+
import { restFetch } from '../rest-fetch.js';
|
|
3
|
+
import { FirebaseEdgeError } from '../auth/errors.js';
|
|
4
|
+
/** @internal A reusable resolver with bounded caching and key rotation. */
|
|
5
|
+
export function createAppCheckKeyResolver(fetch) {
|
|
6
|
+
return createRemoteJWKSet(new URL('https://firebaseappcheck.googleapis.com/v1/jwks'), {
|
|
7
|
+
[customFetch]: fetch
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
/** @internal Authenticated App Check operations. */
|
|
11
|
+
export async function appCheckRequest(projectId, accessToken, operation, fetch) {
|
|
12
|
+
const project = encodeURIComponent(projectId);
|
|
13
|
+
const exchange = 'appId' in operation;
|
|
14
|
+
const path = exchange
|
|
15
|
+
? `v1/projects/${project}/apps/${encodeURIComponent(operation.appId)}:exchangeCustomToken`
|
|
16
|
+
: `v1beta/projects/${project}:verifyAppCheckToken`;
|
|
17
|
+
const { error, data } = await restFetch(`https://firebaseappcheck.googleapis.com/${path}`, {
|
|
18
|
+
method: 'POST',
|
|
19
|
+
bearerToken: accessToken,
|
|
20
|
+
body: exchange
|
|
21
|
+
? {
|
|
22
|
+
customToken: operation.customToken,
|
|
23
|
+
...(operation.limitedUse !== undefined && {
|
|
24
|
+
limitedUse: operation.limitedUse
|
|
25
|
+
}),
|
|
26
|
+
...(operation.jti !== undefined && { jti: operation.jti })
|
|
27
|
+
}
|
|
28
|
+
: { app_check_token: operation.token },
|
|
29
|
+
global: { fetch }
|
|
30
|
+
});
|
|
31
|
+
if (error !== null) {
|
|
32
|
+
const status = typeof error === 'object' ? error?.error?.status : undefined;
|
|
33
|
+
const codes = {
|
|
34
|
+
INVALID_ARGUMENT: 'invalid-argument',
|
|
35
|
+
PERMISSION_DENIED: 'permission-denied',
|
|
36
|
+
UNAUTHENTICATED: 'unauthenticated',
|
|
37
|
+
NOT_FOUND: 'not-found',
|
|
38
|
+
RESOURCE_EXHAUSTED: 'resource-exhausted'
|
|
39
|
+
};
|
|
40
|
+
throw new FirebaseEdgeError({
|
|
41
|
+
code: `app-check/${codes[status ?? ''] ?? 'unknown-error'}`,
|
|
42
|
+
message: typeof error === 'string'
|
|
43
|
+
? error
|
|
44
|
+
: (error?.error?.message ?? 'App Check request failed.')
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
if (!data || typeof data !== 'object') {
|
|
48
|
+
throw new FirebaseEdgeError({
|
|
49
|
+
code: 'app-check/internal-error',
|
|
50
|
+
message: 'Invalid App Check response.'
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return data;
|
|
54
|
+
}
|
|
55
|
+
/** @internal Convert the exchange response's protobuf duration. */
|
|
56
|
+
export function parseAppCheckToken(data) {
|
|
57
|
+
if (typeof data.token !== 'string' ||
|
|
58
|
+
!data.token ||
|
|
59
|
+
typeof data.ttl !== 'string' ||
|
|
60
|
+
!/^\d+(?:\.\d{1,9})?s$/.test(data.ttl)) {
|
|
61
|
+
throw new FirebaseEdgeError({
|
|
62
|
+
code: 'app-check/internal-error',
|
|
63
|
+
message: 'Invalid App Check token response.'
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
const ttlMillis = Math.floor(Number(data.ttl.slice(0, -1)) * 1000);
|
|
67
|
+
if (!Number.isSafeInteger(ttlMillis) || ttlMillis <= 0) {
|
|
68
|
+
throw new FirebaseEdgeError({
|
|
69
|
+
code: 'app-check/internal-error',
|
|
70
|
+
message: 'Invalid App Check token lifetime.'
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
return { token: data.token, ttlMillis };
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=app-check-endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-check-endpoints.js","sourceRoot":"","sources":["../../src/app-check/app-check-endpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,2EAA2E;AAC3E,MAAM,UAAU,yBAAyB,CAAC,KAA8B;IACpE,OAAO,kBAAkB,CACrB,IAAI,GAAG,CAAC,iDAAiD,CAAC,EAC1D;QACI,CAAC,WAAW,CAAC,EAAE,KAAK;KACvB,CACJ,CAAC;AACN,CAAC;AAED,oDAAoD;AACpD,MAAM,CAAC,KAAK,UAAU,eAAe,CACjC,SAAiB,EACjB,WAAmB,EACnB,SAOuB,EACvB,KAA8B;IAE9B,MAAM,OAAO,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC9C,MAAM,QAAQ,GAAG,OAAO,IAAI,SAAS,CAAC;I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|
|
3
|
+
import type { createAppCheckKeyResolver } from './app-check-endpoints.js';
|
|
4
|
+
export interface DecodedAppCheckToken extends JWTPayload {
|
|
5
|
+
app_id: string;
|
|
6
|
+
sub: string;
|
|
7
|
+
aud: string[];
|
|
8
|
+
iss: string;
|
|
9
|
+
iat: number;
|
|
10
|
+
exp: number;
|
|
11
|
+
}
|
|
12
|
+
/** @internal Sign the short-lived assertion used by a custom provider. */
|
|
13
|
+
export declare function signAppCheckToken(account: ServiceAccount, appId: string, ttlMillis?: number): Promise<string>;
|
|
14
|
+
/** @internal Verify signatures before trusting any App Check claims. */
|
|
15
|
+
export declare function verifyAppCheckToken(token: string, projectId: string, keys: ReturnType<typeof createAppCheckKeyResolver>): Promise<DecodedAppCheckToken>;
|
|
16
|
+
//# sourceMappingURL=app-check-jwt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-check-jwt.d.ts","sourceRoot":"","sources":["../../src/app-check/app-check-jwt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAE1E,MAAM,WAAW,oBAAqB,SAAQ,UAAU;IACpD,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACf;AAED,0EAA0E;AAC1E,wBAAsB,iBAAiB,CACnC,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM,mBAiCrB;AAED,wEAAwE;AACxE,wBAAsB,mBAAmB,CACrC,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,UAAU,CAAC,OAAO,yBAAyB,CAAC,GACnD,OAAO,CAAC,oBAAoB,CAAC,CAgC/B"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { importPKCS8, SignJWT, jwtVerify } from 'jose';
|
|
2
|
+
import { FirebaseEdgeError } from '../auth/errors.js';
|
|
3
|
+
/** @internal Sign the short-lived assertion used by a custom provider. */
|
|
4
|
+
export async function signAppCheckToken(account, appId, ttlMillis) {
|
|
5
|
+
if (typeof appId !== 'string' ||
|
|
6
|
+
!appId.trim() ||
|
|
7
|
+
(ttlMillis !== undefined &&
|
|
8
|
+
(!Number.isFinite(ttlMillis) ||
|
|
9
|
+
ttlMillis < 1800000 ||
|
|
10
|
+
ttlMillis > 604800000))) {
|
|
11
|
+
throw new FirebaseEdgeError({
|
|
12
|
+
code: 'app-check/invalid-argument',
|
|
13
|
+
message: 'Provide an app ID and a TTL between 30 minutes and 7 days.'
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
const key = await importPKCS8(account.private_key.replace(/\\n/g, '\n'), 'RS256');
|
|
17
|
+
return new SignJWT({
|
|
18
|
+
app_id: appId,
|
|
19
|
+
...(ttlMillis !== undefined && { ttl: `${ttlMillis / 1000}s` })
|
|
20
|
+
})
|
|
21
|
+
.setProtectedHeader({ alg: 'RS256', typ: 'JWT' })
|
|
22
|
+
.setIssuer(account.client_email)
|
|
23
|
+
.setSubject(account.client_email)
|
|
24
|
+
.setAudience('https://firebaseappcheck.googleapis.com/google.firebase.appcheck.v1.TokenExchangeService')
|
|
25
|
+
.setIssuedAt()
|
|
26
|
+
.setExpirationTime('5m')
|
|
27
|
+
.sign(key);
|
|
28
|
+
}
|
|
29
|
+
/** @internal Verify signatures before trusting any App Check claims. */
|
|
30
|
+
export async function verifyAppCheckToken(token, projectId, keys) {
|
|
31
|
+
if (typeof token !== 'string' || !token.trim()) {
|
|
32
|
+
throw new FirebaseEdgeError({
|
|
33
|
+
code: 'app-check/invalid-argument',
|
|
34
|
+
message: 'Provide an App Check token.'
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
const { payload, protectedHeader } = await jwtVerify(token, keys, {
|
|
38
|
+
algorithms: ['RS256'],
|
|
39
|
+
audience: `projects/${projectId}`,
|
|
40
|
+
requiredClaims: ['iss', 'sub', 'aud', 'iat', 'exp']
|
|
41
|
+
});
|
|
42
|
+
if (typeof protectedHeader.kid !== 'string' ||
|
|
43
|
+
!protectedHeader.kid ||
|
|
44
|
+
!Array.isArray(payload.aud) ||
|
|
45
|
+
typeof payload.iss !== 'string' ||
|
|
46
|
+
!/^https:\/\/firebaseappcheck\.googleapis\.com\/[^/]+$/.test(payload.iss) ||
|
|
47
|
+
typeof payload.sub !== 'string' ||
|
|
48
|
+
!payload.sub.trim() ||
|
|
49
|
+
typeof payload.iat !== 'number' ||
|
|
50
|
+
payload.iat > Date.now() / 1000 ||
|
|
51
|
+
payload.exp <= payload.iat) {
|
|
52
|
+
throw new FirebaseEdgeError({
|
|
53
|
+
code: 'app-check/invalid-argument',
|
|
54
|
+
message: 'Invalid App Check token claims.'
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
return { ...payload, app_id: payload.sub };
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=app-check-jwt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-check-jwt.js","sourceRoot":"","sources":["../../src/app-check/app-check-jwt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAmB,MAAM,MAAM,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAYtD,0EAA0E;AAC1E,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACnC,OAAuB,EACvB,KAAa,EACb,SAAkB;IAElB,IACI,OAAO,KAAK,KAAK,QAAQ;QACzB,CAAC,KAAK,CAAC,IAAI,EAAE;QACb,CAAC,SAAS,KAAK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