rez_core 2.2.151 → 2.2.152

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rez_core",
3
- "version": "2.2.151",
3
+ "version": "2.2.152",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -1,21 +1,31 @@
1
1
  import { Injectable } from '@nestjs/common';
2
- import { ConfigService } from '@nestjs/config';
3
2
  import { PassportStrategy } from '@nestjs/passport';
4
3
  import { Strategy, VerifyCallback } from 'passport-google-oauth20';
4
+ import { ConfigService } from '@nestjs/config';
5
5
 
6
6
  @Injectable()
7
7
  export class GoogleStrategy extends PassportStrategy(Strategy, 'google') {
8
8
  constructor(private configService: ConfigService) {
9
9
  super({
10
- clientID: configService.get('CLIENT_ID'),
11
- clientSecret: configService.get('CLIENT_SECRET'),
12
- callbackURL: configService.get('CALLBACK_URL'),
10
+ clientID: configService.get<string>('CLIENT_ID')!,
11
+ clientSecret: configService.get<string>('CLIENT_SECRET')!,
12
+ callbackURL: configService.get<string>('CALLBACK_URL')!,
13
13
  scope: ['openid', 'email', 'profile'],
14
- accessType: 'offline',
15
- prompt: 'consent',
14
+ accessType: 'offline', // good: gets refresh_token on first consent
15
+ includeGrantedScopes: true, // optional, keeps prior grants
16
+ // ⛔️ don't rely on 'prompt' here; add via authorizationParams()
16
17
  });
17
18
  }
18
19
 
20
+ // ✅ Guarantees account chooser every time
21
+ authorizationParams(): Record<string, string> {
22
+ return {
23
+ prompt: 'select_account', // or 'consent select_account' if you want re-consent too
24
+ // login_hint: 'user@domain.com', // optional
25
+ // hd: 'your-domain.com', // optional: restrict to a Google Workspace domain
26
+ };
27
+ }
28
+
19
29
  async validate(
20
30
  accessToken: string,
21
31
  refreshToken: string,
@@ -29,7 +39,6 @@ export class GoogleStrategy extends PassportStrategy(Strategy, 'google') {
29
39
  displayName: profile.displayName ?? '',
30
40
  };
31
41
 
32
- // attach what you need; do not persist here if you follow clean patterns
33
42
  return done(null, {
34
43
  email,
35
44
  name,
@@ -61,5 +61,9 @@ export class EntityMaster extends BaseEntity {
61
61
  @Column({ name: 'storage_type', nullable: true, length: 20 })
62
62
  storage_type: string;
63
63
 
64
+ @Column({ name: 'show_in_entity_list', nullable: true, length: 20 })
65
+ show_in_entity_list: string;
64
66
 
67
+ @Column({ name: 'code_entry', nullable: true, length: 20 })
68
+ code_entry: string;
65
69
  }
@@ -7,9 +7,9 @@ DB_NAME: 'package_core'
7
7
  MASTER_KEY: '0QZ2eRJv5oVILYnyBlC+FbSGVQiWKReh'
8
8
  MASTER_IV: 'heuUQf5uPVtkotrFAOKUVw=='
9
9
  SECRET_KEY: '1hard_to_guess_secret7890a'
10
- CLIENT_ID: '324529881356-596sc8ksrb9lg01i7sktofqqqf0fv2ug.apps.googleusercontent.com'
11
- CLIENT_SECRET: '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'
12
- CALLBACK_URL: 'http://localhost:3000/auth/google/callback'
10
+ CLIENT_ID: '819281384645-2tnuvm80sul1n2ahqa4eg6kjd19pnbu9.apps.googleusercontent.com'
11
+ CLIENT_SECRET: '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'
12
+ CALLBACK_URL: 'http://localhost:5001/auth/google/callback'
13
13
  OTP_EXPIRY: '10'
14
14
  OTP_LENGTH: '6'
15
15
  VERIFY_OTP: 'false'