@zenith-open/zenithcms-plugin-auth-github 1.0.0-beta.10 → 1.0.0-beta.8
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/src/index.d.ts +2 -0
- package/dist/src/index.js +24 -0
- package/package.json +3 -3
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.githubAuthPlugin = void 0;
|
|
4
|
+
const githubAuthPlugin = () => {
|
|
5
|
+
return {
|
|
6
|
+
id: 'auth-github',
|
|
7
|
+
name: 'GitHub OAuth',
|
|
8
|
+
description: 'GitHub Authentication Integration',
|
|
9
|
+
onReady: async (ctx) => {
|
|
10
|
+
ctx.logger.info('[GitHub Auth Plugin] Registering GitHub passport strategy...');
|
|
11
|
+
const core = require('@zenith-open/zenithcms-core');
|
|
12
|
+
if (core && core.passport && core.AuthStrategyRegistry) {
|
|
13
|
+
const { Strategy } = require('passport-github2');
|
|
14
|
+
core.AuthStrategyRegistry.registerStrategy({
|
|
15
|
+
name: 'github',
|
|
16
|
+
displayName: 'GitHub Login',
|
|
17
|
+
icon: 'brand-github',
|
|
18
|
+
authenticate: async () => ({ success: false, error: 'GitHub OAuth not fully configured in scaffold' })
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
exports.githubAuthPlugin = githubAuthPlugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenith-open/zenithcms-plugin-auth-github",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.8",
|
|
4
4
|
"description": "GitHub OAuth Strategy",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"typescript": "^5.4.5"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@zenith-open/zenithcms-
|
|
15
|
-
"@zenith-open/zenithcms-
|
|
14
|
+
"@zenith-open/zenithcms-core": "1.0.0-beta.8",
|
|
15
|
+
"@zenith-open/zenithcms-types": "1.0.0-beta.8"
|
|
16
16
|
},
|
|
17
17
|
"publishConfig": {
|
|
18
18
|
"access": "public"
|