@cedarjs/auth-netlify-setup 8.0.0-canary.3483 → 8.0.0-canary.3489
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.
|
@@ -5,7 +5,7 @@ import { AuthenticationError, ForbiddenError } from '@cedarjs/graphql-server'
|
|
|
5
5
|
* Represents the user attributes returned by the decoding the
|
|
6
6
|
* Authentication provider's JWT together with an optional list of roles.
|
|
7
7
|
*/
|
|
8
|
-
type
|
|
8
|
+
type CedarUser = Record<string, unknown> & { roles: string[] }
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* getCurrentUser returns the user information together with
|
|
@@ -27,11 +27,11 @@ type RedwoodUser = Record<string, unknown> & { roles: string[] }
|
|
|
27
27
|
* @param { APIGatewayEvent event, Context context } - An optional object which
|
|
28
28
|
* contains information from the invoker such as headers and cookies, and the
|
|
29
29
|
* context information about the invocation such as IP Address
|
|
30
|
-
* @returns
|
|
30
|
+
* @returns CedarUser
|
|
31
31
|
*/
|
|
32
32
|
export const getCurrentUser = async (
|
|
33
33
|
decoded: Decoded
|
|
34
|
-
): Promise<
|
|
34
|
+
): Promise<CedarUser | null> => {
|
|
35
35
|
if (!decoded) {
|
|
36
36
|
return null
|
|
37
37
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/auth-netlify-setup",
|
|
3
|
-
"version": "8.0.0-canary.
|
|
3
|
+
"version": "8.0.0-canary.3489",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"test:watch": "vitest watch"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@cedarjs/cli-helpers": "8.0.0-canary.
|
|
42
|
+
"@cedarjs/cli-helpers": "8.0.0-canary.3489"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@cedarjs/framework-tools": "8.0.0-canary.
|
|
45
|
+
"@cedarjs/framework-tools": "8.0.0-canary.3489",
|
|
46
46
|
"@types/yargs": "17.0.35",
|
|
47
47
|
"concurrently": "9.2.5",
|
|
48
48
|
"publint": "0.3.25",
|