@cedarjs/auth-firebase-setup 7.0.1-next.466 → 7.1.0-rc.32

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.
@@ -1 +1 @@
1
- {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAGjC,eAAO,MAAM,OAAO,aAAa,CAAA;AACjC,eAAO,MAAM,WAAW,iCAAiC,CAAA;AAEzD,wBAAgB,OAAO,CAAC,KAAK,EAAE,IAAI;;;;GAElC;AAED,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,OAAO,CAAA;CACf;AAED,wBAAsB,OAAO,CAAC,OAAO,EAAE,IAAI,iBAG1C"}
1
+ {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAIjC,eAAO,MAAM,OAAO,aAAa,CAAA;AACjC,eAAO,MAAM,WAAW,iCAAiC,CAAA;AAEzD,wBAAgB,OAAO,CAAC,KAAK,EAAE,IAAI;;;;GAElC;AAED,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,OAAO,CAAA;CACf;AAED,wBAAsB,OAAO,CAAC,OAAO,EAAE,IAAI,iBAG1C"}
package/dist/setup.js CHANGED
@@ -1,4 +1,4 @@
1
- import { standardAuthBuilder } from "@cedarjs/cli-helpers/auth/setupHelpers";
1
+ import { standardAuthBuilder } from "@cedarjs/cli-helpers";
2
2
  const command = "firebase";
3
3
  const description = "Set up auth for for Firebase";
4
4
  function builder(yargs) {
@@ -1,6 +1,6 @@
1
1
  import fs from "node:fs";
2
2
  import path from "path";
3
- import { standardAuthHandler } from "@cedarjs/cli-helpers/auth/setupHelpers";
3
+ import { standardAuthHandler } from "@cedarjs/cli-helpers";
4
4
  const { version } = JSON.parse(
5
5
  fs.readFileSync(
6
6
  path.resolve(import.meta.dirname, "../package.json"),
@@ -1,6 +1,5 @@
1
1
  import admin from 'firebase-admin'
2
2
 
3
- import type { AuthContextPayload, Decoded } from '@cedarjs/api'
4
3
  import { AuthenticationError } from '@cedarjs/graphql-server'
5
4
 
6
5
  // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
@@ -25,11 +24,11 @@ const adminApp = admin.initializeApp({
25
24
  * @see https://github.com/cedarjs/cedar/tree/main/packages/auth for examples
26
25
  */
27
26
  export const getCurrentUser = async (
28
- decoded: Decoded,
27
+ decoded,
29
28
  /* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars */
30
- { token, type }: AuthContextPayload[1],
29
+ { token, type },
31
30
  /* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars */
32
- { event, context }: Partial<AuthContextPayload[2]> = {}
31
+ { event, context }
33
32
  ) => {
34
33
  return decoded
35
34
  }
@@ -53,11 +52,7 @@ export const isAuthenticated = (): boolean => {
53
52
  *
54
53
  * @see https://github.com/cedarjs/cedar/tree/main/packages/auth for examples
55
54
  */
56
- export const requireAuth = (
57
- // The @requireAuth directive passes the roles it was given. Checking them
58
- // needs a custom RBAC implementation, see below
59
- _options: { roles?: string | string[] } = {}
60
- ) => {
55
+ export const requireAuth = () => {
61
56
  if (!isAuthenticated()) {
62
57
  throw new AuthenticationError("You don't have permission to do that.")
63
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/auth-firebase-setup",
3
- "version": "7.0.1-next.466",
3
+ "version": "7.1.0-rc.32",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cedarjs/cedar.git",
@@ -39,13 +39,13 @@
39
39
  "test:watch": "vitest watch"
40
40
  },
41
41
  "dependencies": {
42
- "@cedarjs/cli-helpers": "7.0.1-next.466"
42
+ "@cedarjs/cli-helpers": "7.1.0-rc.32"
43
43
  },
44
44
  "devDependencies": {
45
- "@cedarjs/framework-tools": "7.0.1-next.466",
45
+ "@cedarjs/framework-tools": "7.1.0-rc.32",
46
46
  "@types/yargs": "17.0.35",
47
- "concurrently": "9.2.5",
48
- "publint": "0.3.25",
47
+ "concurrently": "9.2.4",
48
+ "publint": "0.3.24",
49
49
  "typescript": "5.9.3",
50
50
  "vitest": "4.1.11"
51
51
  },