@mastra/auth-firebase 0.0.0-consolidate-changesets-20250904042643
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/CHANGELOG.md +31 -0
- package/LICENSE.md +15 -0
- package/README.md +67 -0
- package/dist/chunk-32EQK4OY.js +974 -0
- package/dist/chunk-32EQK4OY.js.map +1 -0
- package/dist/chunk-B2N25K77.cjs +979 -0
- package/dist/chunk-B2N25K77.cjs.map +1 -0
- package/dist/chunk-G7ML3FDV.js +9 -0
- package/dist/chunk-G7ML3FDV.js.map +1 -0
- package/dist/chunk-UYPX6MT6.cjs +32 -0
- package/dist/chunk-UYPX6MT6.cjs.map +1 -0
- package/dist/getMachineId-bsd-G4THBH3V.js +23 -0
- package/dist/getMachineId-bsd-G4THBH3V.js.map +1 -0
- package/dist/getMachineId-bsd-GQTQCD37.cjs +25 -0
- package/dist/getMachineId-bsd-GQTQCD37.cjs.map +1 -0
- package/dist/getMachineId-darwin-3P7FJFHV.js +24 -0
- package/dist/getMachineId-darwin-3P7FJFHV.js.map +1 -0
- package/dist/getMachineId-darwin-43NRSF2D.cjs +26 -0
- package/dist/getMachineId-darwin-43NRSF2D.cjs.map +1 -0
- package/dist/getMachineId-linux-H4F4I7A5.js +19 -0
- package/dist/getMachineId-linux-H4F4I7A5.js.map +1 -0
- package/dist/getMachineId-linux-TZ3NOAZ5.cjs +21 -0
- package/dist/getMachineId-linux-TZ3NOAZ5.cjs.map +1 -0
- package/dist/getMachineId-unsupported-EZLLFFYA.cjs +13 -0
- package/dist/getMachineId-unsupported-EZLLFFYA.cjs.map +1 -0
- package/dist/getMachineId-unsupported-T3AERO5R.js +11 -0
- package/dist/getMachineId-unsupported-T3AERO5R.js.map +1 -0
- package/dist/getMachineId-win-B5AEGZT7.cjs +47 -0
- package/dist/getMachineId-win-B5AEGZT7.cjs.map +1 -0
- package/dist/getMachineId-win-Z5QAASBF.js +25 -0
- package/dist/getMachineId-win-Z5QAASBF.js.map +1 -0
- package/dist/index.cjs +463 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +457 -0
- package/dist/index.js.map +1 -0
- package/package.json +54 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# @mastra/auth-firebase
|
|
2
|
+
|
|
3
|
+
## 0.0.0-consolidate-changesets-20250904042643
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- de3cbc6: Update the `package.json` file to include additional fields like `repository`, `homepage` or `files`.
|
|
8
|
+
|
|
9
|
+
## 0.10.3-alpha.0
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#7343](https://github.com/mastra-ai/mastra/pull/7343) [`de3cbc6`](https://github.com/mastra-ai/mastra/commit/de3cbc61079211431bd30487982ea3653517278e) Thanks [@LekoArts](https://github.com/LekoArts)! - Update the `package.json` file to include additional fields like `repository`, `homepage` or `files`.
|
|
14
|
+
|
|
15
|
+
## 0.10.2
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`c6113ed`](https://github.com/mastra-ai/mastra/commit/c6113ed7f9df297e130d94436ceee310273d6430) Thanks [@wardpeet](https://github.com/wardpeet)! - Fix peerdpes for @mastra/core
|
|
20
|
+
|
|
21
|
+
## 0.10.1
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- 4a406ec: fixes TypeScript declaration file imports to ensure proper ESM compatibility
|
|
26
|
+
|
|
27
|
+
## 0.10.1-alpha.0
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- 4a406ec: fixes TypeScript declaration file imports to ensure proper ESM compatibility
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Apache License 2.0
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Kepler Software, Inc.
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# @mastra/auth-firebase
|
|
2
|
+
|
|
3
|
+
A Firebase authentication integration package for Mastra applications. This package provides seamless integration with Firebase Authentication and Firestore for user authentication and authorization.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @mastra/auth-firebase
|
|
9
|
+
# or
|
|
10
|
+
yarn add @mastra/auth-firebase
|
|
11
|
+
# or
|
|
12
|
+
pnpm add @mastra/auth-firebase
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
- Firebase Authentication integration
|
|
18
|
+
- Firestore-based user authorization
|
|
19
|
+
- Support for service account credentials
|
|
20
|
+
- Automatic token verification
|
|
21
|
+
- User access control through Firestore
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { Mastra } from '@mastra/core';
|
|
27
|
+
import { MastraAuthFirebase } from '@mastra/auth-firebase';
|
|
28
|
+
|
|
29
|
+
// Initialize with default configuration
|
|
30
|
+
const auth = new MastraAuthFirebase();
|
|
31
|
+
|
|
32
|
+
// Or with custom options
|
|
33
|
+
const auth = new MastraAuthFirebase({
|
|
34
|
+
serviceAccount: 'path/to/service-account.json',
|
|
35
|
+
databaseId: 'your-database-id',
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// Enable auth in Mastra
|
|
39
|
+
const mastra = new Mastra({
|
|
40
|
+
...
|
|
41
|
+
server: {
|
|
42
|
+
experimental_auth: auth,
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Configuration
|
|
48
|
+
|
|
49
|
+
The package can be configured through constructor options or environment variables:
|
|
50
|
+
|
|
51
|
+
### Constructor Options
|
|
52
|
+
|
|
53
|
+
- `serviceAccount`: Path to Firebase service account JSON file
|
|
54
|
+
- `databaseId`: Firestore database ID
|
|
55
|
+
|
|
56
|
+
### Environment Variables
|
|
57
|
+
|
|
58
|
+
- `FIREBASE_SERVICE_ACCOUNT`: Path to Firebase service account JSON file
|
|
59
|
+
- `FIRESTORE_DATABASE_ID` or `FIREBASE_DATABASE_ID`: Firestore database ID
|
|
60
|
+
|
|
61
|
+
## User Authorization
|
|
62
|
+
|
|
63
|
+
The package uses Firestore to manage user access. It expects a collection named `user_access` with documents keyed by user UIDs. The presence of a document in this collection determines whether a user is authorized.
|
|
64
|
+
|
|
65
|
+
## License
|
|
66
|
+
|
|
67
|
+
Elastic-2.0
|