@studiocms/auth0 0.1.0-beta.29 → 0.1.0-beta.31
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/dist/effect/auth0.d.ts +4 -4
- package/dist/effect/auth0.js +6 -6
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/dist/effect/auth0.d.ts
CHANGED
|
@@ -46,11 +46,11 @@ export declare class Auth0User extends Auth0User_base {
|
|
|
46
46
|
*/
|
|
47
47
|
export declare const cleanDomain: (domain: string) => string;
|
|
48
48
|
declare const Auth0OAuthAPI_base: Effect.Service.Class<Auth0OAuthAPI, "Auth0OAuthAPI", {
|
|
49
|
-
readonly dependencies: readonly [import("effect/Layer").Layer<import("studiocms/lib/auth/verify-email").VerifyEmail, Error, never>, import("effect/Layer").Layer<Platform.HttpClient.HttpClient, never, never>];
|
|
49
|
+
readonly dependencies: readonly [import("effect/Layer").Layer<import("studiocms/lib/auth/verify-email").VerifyEmail, Error | import("effect/ConfigError").ConfigError, never>, import("effect/Layer").Layer<Platform.HttpClient.HttpClient, never, never>];
|
|
50
50
|
readonly effect: Effect.Effect<{
|
|
51
|
-
initSession: (context: APIContext) => Effect.Effect<Response, import("@withstudiocms/auth-kit/errors").SessionError, never>;
|
|
52
|
-
initCallback: (context: APIContext) => Effect.Effect<Response, import("@withstudiocms/auth-kit/errors").SessionError, never>;
|
|
53
|
-
}, import("@withstudiocms/auth-kit/errors").SessionError | import("@withstudiocms/auth-kit/errors").UserError, import("studiocms/lib/auth/verify-email").VerifyEmail | Platform.HttpClient.HttpClient>;
|
|
51
|
+
initSession: (context: APIContext) => Effect.Effect<Response, import("effect/ConfigError").ConfigError | import("@withstudiocms/auth-kit/errors").SessionError, never>;
|
|
52
|
+
initCallback: (context: APIContext) => Effect.Effect<Response, import("effect/ConfigError").ConfigError | import("@withstudiocms/auth-kit/errors").SessionError, never>;
|
|
53
|
+
}, import("effect/ConfigError").ConfigError | import("studiocms/sdk/base").DBClientInitializationError | import("studiocms/sdk/base").SDKInitializationError | import("@withstudiocms/auth-kit/errors").SessionError | import("@withstudiocms/auth-kit/errors").UserError, import("studiocms/lib/auth/verify-email").VerifyEmail | Platform.HttpClient.HttpClient>;
|
|
54
54
|
}>;
|
|
55
55
|
/**
|
|
56
56
|
* Provides Auth0 OAuth authentication effects for the StudioCMS API.
|
package/dist/effect/auth0.js
CHANGED
|
@@ -85,10 +85,10 @@ class Auth0OAuthAPI extends Effect.Service()("Auth0OAuthAPI", {
|
|
|
85
85
|
}
|
|
86
86
|
const auth0User = yield* validateAuthCode(code, codeVerifier);
|
|
87
87
|
const { sub: auth0UserId, name: auth0Username } = auth0User;
|
|
88
|
-
const existingOAuthAccount = yield* sdk.AUTH.oAuth.searchProvidersForId(
|
|
89
|
-
Auth0OAuthAPI.ProviderID,
|
|
90
|
-
auth0UserId
|
|
91
|
-
);
|
|
88
|
+
const existingOAuthAccount = yield* sdk.AUTH.oAuth.searchProvidersForId({
|
|
89
|
+
providerId: Auth0OAuthAPI.ProviderID,
|
|
90
|
+
userId: auth0UserId
|
|
91
|
+
});
|
|
92
92
|
if (existingOAuthAccount) {
|
|
93
93
|
const user = yield* sdk.GET.users.byId(existingOAuthAccount.userId);
|
|
94
94
|
if (!user) {
|
|
@@ -130,11 +130,11 @@ class Auth0OAuthAPI extends Effect.Service()("Auth0OAuthAPI", {
|
|
|
130
130
|
name: auth0User.name,
|
|
131
131
|
email: auth0User.email,
|
|
132
132
|
avatar: auth0User.picture,
|
|
133
|
-
createdAt: /* @__PURE__ */ new Date(),
|
|
133
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
134
134
|
emailVerified: false,
|
|
135
135
|
notifications: null,
|
|
136
136
|
password: null,
|
|
137
|
-
updatedAt: /* @__PURE__ */ new Date(),
|
|
137
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
138
138
|
url: null
|
|
139
139
|
},
|
|
140
140
|
{ provider: Auth0OAuthAPI.ProviderID, providerUserId: auth0UserId }
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ function studiocmsAuth0() {
|
|
|
8
8
|
name: "StudioCMS Auth0 Provider Plugin",
|
|
9
9
|
studiocmsMinimumVersion: "0.1.0-beta.22",
|
|
10
10
|
hooks: {
|
|
11
|
-
"studiocms:
|
|
11
|
+
"studiocms:auth": ({ setAuthService }) => {
|
|
12
12
|
setAuthService({
|
|
13
13
|
oAuthProvider: {
|
|
14
14
|
name: "auth0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studiocms/auth0",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.31",
|
|
4
4
|
"description": "Add Auth0 OAuth Support into your StudioCMS project.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "withstudiocms",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"astro": "^5.12.9",
|
|
58
|
-
"effect": "^3.19.
|
|
58
|
+
"effect": "^3.19.9",
|
|
59
59
|
"vite": "^6.3.4",
|
|
60
|
-
"studiocms": "0.1.0-beta.
|
|
60
|
+
"studiocms": "0.1.0-beta.31"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"build": "buildkit build 'src/**/*.{ts,astro,css,json,png}'",
|