@comasoft/nestjs 0.2.0 → 0.2.1
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.
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const AppleStrategy_base: new (...args: any[]) => any;
|
|
2
|
+
export declare class AppleStrategy extends AppleStrategy_base {
|
|
3
|
+
constructor();
|
|
4
|
+
validate(accessToken: string, refreshToken: string, idToken: any, profile: any): Promise<{
|
|
5
|
+
vendor_uid: any;
|
|
6
|
+
name: any;
|
|
7
|
+
nickname: any;
|
|
8
|
+
email: any;
|
|
9
|
+
profile_image: any;
|
|
10
|
+
refresh_token: string;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,s){function fulfilled(e){try{step(r.next(e))}catch(e){s(e)}}function rejected(e){try{step(r.throw(e))}catch(e){s(e)}}function step(e){e.done?o(e.value):function adopt(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(fulfilled,rejected)}step((r=r.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppleStrategy=void 0;const t=require("@nestjs/passport"),n=require("passport-apple");class AppleStrategy extends((0,t.PassportStrategy)(n.Strategy,"apple")){constructor(){const e=process.env.APPLE_CLIENT_ID,t=process.env.APPLE_TEAM_ID,n=process.env.APPLE_KEY_ID,r=process.env.APPLE_PRIVATE_KEY_LOCATION,o=process.env.APPLE_CALLBACK_URL;if(!(e&&t&&n&&o))throw new Error("Apple OAuth Environment Variables are not set");if(!r)throw new Error("APPLE_PRIVATE_KEY_LOCATION is not set");super({clientID:e,teamID:t,keyID:n,privateKeyLocation:r,callbackURL:o,scope:["name","email"],passReqToCallback:!1})}validate(t,n,r,o){return e(this,void 0,void 0,function*(){const{sub:e,email:t}=r,s=o.name?`${o.name.firstName||""} ${o.name.lastName||""}`.trim():void 0;return{vendor_uid:e,name:s||(null==t?void 0:t.split("@")[0]),nickname:s||(null==t?void 0:t.split("@")[0]),email:t,profile_image:void 0,refresh_token:n}})}}exports.AppleStrategy=AppleStrategy;
|
package/dist/passport/index.d.ts
CHANGED
package/dist/passport/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=this&&this.__createBinding||(Object.create?function(e,t,
|
|
1
|
+
var e=this&&this.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t);var i=Object.getOwnPropertyDescriptor(r,t);i&&!("get"in i?!r.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,o,i)}:function(e,r,t,o){void 0===o&&(o=t),e[o]=r[t]}),r=this&&this.__exportStar||function(r,t){for(var o in r)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||e(t,r,o)};Object.defineProperty(exports,"__esModule",{value:!0}),r(require("./apple.strategy"),exports),r(require("./google.strategy"),exports),r(require("./jwt.strategy"),exports),r(require("./kakao.strategy"),exports),r(require("./local.strategy"),exports),r(require("./naver.strategy"),exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const NaverStrategy_base: new (...args: any[]) => any;
|
|
2
|
+
export declare class NaverStrategy extends NaverStrategy_base {
|
|
3
|
+
constructor();
|
|
4
|
+
validate(accessToken: string, refreshToken: string, profile: any): Promise<{
|
|
5
|
+
vendor_uid: any;
|
|
6
|
+
name: any;
|
|
7
|
+
nickname: any;
|
|
8
|
+
email: any;
|
|
9
|
+
profile_image: any;
|
|
10
|
+
refresh_token: string;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(a,o){function fulfilled(e){try{step(n.next(e))}catch(e){o(e)}}function rejected(e){try{step(n.throw(e))}catch(e){o(e)}}function step(e){e.done?a(e.value):function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.NaverStrategy=void 0;const t=require("@nestjs/passport"),r=require("passport-naver");class NaverStrategy extends((0,t.PassportStrategy)(r.Strategy,"naver")){constructor(){const e=process.env.NAVER_CLIENT_ID,t=process.env.NAVER_CLIENT_SECRET,r=process.env.NAVER_CALLBACK_URL;if(!e||!t||!r)throw new Error("Naver OAuth Environment Variables are not set");super({clientID:e,clientSecret:t,callbackURL:r})}validate(t,r,n){return e(this,void 0,void 0,function*(){var e;const{id:t,emails:a,displayName:o,_json:i}=n;return{vendor_uid:t,name:i.name||o,nickname:i.nickname||o,email:(null===(e=null==a?void 0:a[0])||void 0===e?void 0:e.value)||i.email,profile_image:i.profile_image,refresh_token:r}})}}exports.NaverStrategy=NaverStrategy;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comasoft/nestjs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"private": false,
|
|
6
6
|
"exports": {
|
|
@@ -39,10 +39,12 @@
|
|
|
39
39
|
"date-fns-tz": "^3.2.0",
|
|
40
40
|
"express": "4.21.2",
|
|
41
41
|
"ioredis": "^5.6.1",
|
|
42
|
+
"passport-apple": "^2.0.2",
|
|
42
43
|
"passport-google-oauth20": "^2.0.0",
|
|
43
44
|
"passport-jwt": "4.0.1",
|
|
44
45
|
"passport-kakao": "1.0.1",
|
|
45
46
|
"passport-local": "1.0.0",
|
|
47
|
+
"passport-naver": "^1.0.6",
|
|
46
48
|
"pino-pretty": "^13.0.0",
|
|
47
49
|
"resend": "^6.4.1",
|
|
48
50
|
"ua-parser-js": "^2.0.3"
|