@memberjunction/ng-auth-services 2.129.0 → 2.130.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.
- package/dist/lib/IAuthProvider.d.ts +179 -17
- package/dist/lib/IAuthProvider.d.ts.map +1 -1
- package/dist/lib/auth-types.d.ts +351 -0
- package/dist/lib/auth-types.d.ts.map +1 -0
- package/dist/lib/auth-types.js +98 -0
- package/dist/lib/auth-types.js.map +1 -0
- package/dist/lib/mjexplorer-auth-base.service.d.ts +225 -49
- package/dist/lib/mjexplorer-auth-base.service.d.ts.map +1 -1
- package/dist/lib/mjexplorer-auth-base.service.js +189 -54
- package/dist/lib/mjexplorer-auth-base.service.js.map +1 -1
- package/dist/lib/providers/mjexplorer-auth0-provider.service.d.ts +69 -17
- package/dist/lib/providers/mjexplorer-auth0-provider.service.d.ts.map +1 -1
- package/dist/lib/providers/mjexplorer-auth0-provider.service.js +255 -75
- package/dist/lib/providers/mjexplorer-auth0-provider.service.js.map +1 -1
- package/dist/lib/providers/mjexplorer-msal-provider.service.d.ts +65 -16
- package/dist/lib/providers/mjexplorer-msal-provider.service.d.ts.map +1 -1
- package/dist/lib/providers/mjexplorer-msal-provider.service.js +345 -113
- package/dist/lib/providers/mjexplorer-msal-provider.service.js.map +1 -1
- package/dist/lib/providers/mjexplorer-okta-provider.service.d.ts +63 -30
- package/dist/lib/providers/mjexplorer-okta-provider.service.d.ts.map +1 -1
- package/dist/lib/providers/mjexplorer-okta-provider.service.js +273 -234
- package/dist/lib/providers/mjexplorer-okta-provider.service.js.map +1 -1
- package/dist/public-api.d.ts +1 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +2 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mjexplorer-auth-base.service.js","sourceRoot":"","sources":["../../src/lib/mjexplorer-auth-base.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAA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7B,+EAA+E;IAE/E;;;;;OAKG;IACH,iBAAiB;QACf,OAAO,CAAC,UAAU,CAAC,CAAC;IACtB,CAAC;IAED;;;;;OAKG;IACH,cAAc,CAAC,MAA+B;QAC5C,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAChD,OAAO,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAClC,MAAM,CAAC,KAAK,CAAC,KAAK,SAAS,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,CACpD,CAAC;IACJ,CAAC;;gEArYmB,UAAU,WAAV,UAAU;;iFAAV,UAAU;cAD/B,UAAU"}
|
|
@@ -1,24 +1,32 @@
|
|
|
1
1
|
import { MJAuthBase } from '../mjexplorer-auth-base.service';
|
|
2
|
-
import { AuthService,
|
|
3
|
-
import {
|
|
2
|
+
import { AuthService, AuthGuard, Auth0ClientFactory, AuthClientConfig } from '@auth0/auth0-angular';
|
|
3
|
+
import { StandardUserInfo, StandardAuthToken, StandardAuthError, TokenRefreshResult } from '../auth-types';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare function LoadMJAuth0Provider(): void;
|
|
6
|
+
/**
|
|
7
|
+
* Auth0 authentication provider implementation - v3.0.0
|
|
8
|
+
*
|
|
9
|
+
* Implements the abstract methods from MJAuthBase to hide Auth0-specific details.
|
|
10
|
+
* The key abstraction is that Auth0 stores the JWT in `idTokenClaims.__raw`,
|
|
11
|
+
* but consumers never need to know this detail.
|
|
12
|
+
*/
|
|
6
13
|
export declare class MJAuth0Provider extends MJAuthBase {
|
|
7
14
|
auth: AuthService;
|
|
8
15
|
static readonly PROVIDER_TYPE = "auth0";
|
|
9
|
-
type
|
|
16
|
+
readonly type = "auth0";
|
|
10
17
|
private _initialized;
|
|
11
18
|
/**
|
|
12
19
|
* Factory function to provide Angular dependencies required by Auth0
|
|
13
20
|
* Stored as a static property for the factory to access without instantiation
|
|
14
21
|
*/
|
|
15
|
-
static angularProviderFactory: (environment:
|
|
22
|
+
static angularProviderFactory: (environment: Record<string, unknown>) => (typeof AuthService | typeof AuthGuard | {
|
|
16
23
|
provide: import("@angular/core").InjectionToken<import("@auth0/auth0-angular").AuthConfig>;
|
|
17
24
|
useValue: {
|
|
18
|
-
domain:
|
|
19
|
-
clientId:
|
|
25
|
+
domain: unknown;
|
|
26
|
+
clientId: unknown;
|
|
20
27
|
authorizationParams: {
|
|
21
28
|
redirect_uri: string;
|
|
29
|
+
scope: string;
|
|
22
30
|
};
|
|
23
31
|
cacheLocation: string;
|
|
24
32
|
useRefreshTokens: boolean;
|
|
@@ -33,20 +41,64 @@ export declare class MJAuth0Provider extends MJAuthBase {
|
|
|
33
41
|
useValue?: undefined;
|
|
34
42
|
})[];
|
|
35
43
|
constructor(auth: AuthService);
|
|
36
|
-
login(options?: any): Observable<void>;
|
|
37
|
-
private ensureInitialized;
|
|
38
|
-
logout(): Promise<void>;
|
|
39
|
-
refresh(): Promise<Observable<any>>;
|
|
40
|
-
getUser(): Promise<Observable<User | null | undefined>>;
|
|
41
|
-
isAuthenticated(): Observable<boolean>;
|
|
42
|
-
getUserClaims(): Promise<Observable<any>>;
|
|
43
|
-
checkExpiredTokenError(error: string): boolean;
|
|
44
44
|
initialize(): Promise<void>;
|
|
45
|
-
protected loginInternal(options?:
|
|
46
|
-
|
|
45
|
+
protected loginInternal(options?: Record<string, unknown>): Promise<void>;
|
|
46
|
+
logout(): Promise<void>;
|
|
47
47
|
handleCallback(): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Extract ID token from Auth0's storage
|
|
50
|
+
*
|
|
51
|
+
* Auth0 stores the JWT string in idTokenClaims.__raw
|
|
52
|
+
* This is the key abstraction - consumers never need to know about __raw!
|
|
53
|
+
*/
|
|
54
|
+
protected extractIdTokenInternal(): Promise<string | null>;
|
|
55
|
+
/**
|
|
56
|
+
* Extract complete token info from Auth0
|
|
57
|
+
*
|
|
58
|
+
* Maps Auth0's token structure to StandardAuthToken
|
|
59
|
+
*/
|
|
60
|
+
protected extractTokenInfoInternal(): Promise<StandardAuthToken | null>;
|
|
61
|
+
/**
|
|
62
|
+
* Extract user info from Auth0 claims
|
|
63
|
+
*
|
|
64
|
+
* Maps Auth0's user object structure to StandardUserInfo
|
|
65
|
+
*/
|
|
66
|
+
protected extractUserInfoInternal(): Promise<StandardUserInfo | null>;
|
|
67
|
+
/**
|
|
68
|
+
* Refresh token using Auth0's silent authentication
|
|
69
|
+
*
|
|
70
|
+
* Uses cacheMode: 'off' to bypass cache and force token refresh
|
|
71
|
+
* With useRefreshTokens: true and offline_access scope, this will use refresh tokens
|
|
72
|
+
*/
|
|
73
|
+
protected refreshTokenInternal(): Promise<TokenRefreshResult>;
|
|
74
|
+
/**
|
|
75
|
+
* Classify Auth0-specific errors into semantic types
|
|
76
|
+
*
|
|
77
|
+
* Maps Auth0 error patterns to AuthErrorType enum
|
|
78
|
+
*/
|
|
79
|
+
protected classifyErrorInternal(error: unknown): StandardAuthError;
|
|
80
|
+
private ensureInitialized;
|
|
81
|
+
/**
|
|
82
|
+
* Map Auth0 User object to StandardUserInfo
|
|
83
|
+
*/
|
|
84
|
+
private mapAuth0UserToStandard;
|
|
85
|
+
/**
|
|
86
|
+
* Get profile picture URL from Auth0
|
|
87
|
+
*
|
|
88
|
+
* Auth0 includes the picture URL directly in user claims.
|
|
89
|
+
* No additional API call needed.
|
|
90
|
+
*/
|
|
91
|
+
protected getProfilePictureUrlInternal(): Promise<string | null>;
|
|
92
|
+
/**
|
|
93
|
+
* Handle session expiry - no-op for Auth0
|
|
94
|
+
*
|
|
95
|
+
* Auth0 uses refresh tokens (offline_access scope), so it doesn't need
|
|
96
|
+
* interactive re-authentication when tokens expire. If refresh fails,
|
|
97
|
+
* the base class will throw an error and the user must log out/in manually.
|
|
98
|
+
*/
|
|
99
|
+
protected handleSessionExpiryInternal(): Promise<void>;
|
|
48
100
|
getRequiredConfig(): string[];
|
|
49
|
-
validateConfig(_config:
|
|
101
|
+
validateConfig(_config: Record<string, unknown>): boolean;
|
|
50
102
|
static ɵfac: i0.ɵɵFactoryDeclaration<MJAuth0Provider, never>;
|
|
51
103
|
static ɵprov: i0.ɵɵInjectableDeclaration<MJAuth0Provider>;
|
|
52
104
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mjexplorer-auth0-provider.service.d.ts","sourceRoot":"","sources":["../../../src/lib/providers/mjexplorer-auth0-provider.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"mjexplorer-auth0-provider.service.d.ts","sourceRoot":"","sources":["../../../src/lib/providers/mjexplorer-auth0-provider.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAiB,SAAS,EAAyC,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAI1J,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EAEjB,kBAAkB,EACnB,MAAM,eAAe,CAAC;;AAGvB,wBAAgB,mBAAmB,SAClC;AAED;;;;;;GAMG;AACH,qBAIa,eAAgB,SAAQ,UAAU;IAqC1B,IAAI,EAAE,WAAW;IApCpC,MAAM,CAAC,QAAQ,CAAC,aAAa,WAAW;IACxC,QAAQ,CAAC,IAAI,WAAiC;IAC9C,OAAO,CAAC,YAAY,CAAS;IAE7B;;;OAGG;IACH,MAAM,CAAC,sBAAsB,gBAAiB,OAAO,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;SA0BnE;gBAEiB,IAAI,EAAE,WAAW;IAY9B,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;cA0CjB,aAAa,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAKzE,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAIvB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IASrC;;;;;OAKG;cACa,sBAAsB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAWhE;;;;OAIG;cACa,wBAAwB,IAAI,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAuB7E;;;;OAIG;cACa,uBAAuB,IAAI,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAc3E;;;;;OAKG;cACa,oBAAoB,IAAI,OAAO,CAAC,kBAAkB,CAAC;IA6CnE;;;;OAIG;IACH,SAAS,CAAC,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,iBAAiB;YAgEpD,iBAAiB;IAM/B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAc9B;;;;;OAKG;cACa,4BAA4B,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAUtE;;;;;;OAMG;cACa,2BAA2B,IAAI,OAAO,CAAC,IAAI,CAAC;IASnD,iBAAiB,IAAI,MAAM,EAAE;IAI7B,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO;yCAhWvD,eAAe;6CAAf,eAAe;CAoW3B"}
|
|
@@ -9,12 +9,21 @@ import { Injectable } from '@angular/core';
|
|
|
9
9
|
import { RegisterClass } from '@memberjunction/global';
|
|
10
10
|
import { MJAuthBase } from '../mjexplorer-auth-base.service';
|
|
11
11
|
import { AuthService, AuthGuard, AuthConfigService, Auth0ClientService, Auth0ClientFactory, AuthClientConfig } from '@auth0/auth0-angular';
|
|
12
|
-
import {
|
|
12
|
+
import { firstValueFrom } from 'rxjs';
|
|
13
|
+
import { take, filter } from 'rxjs/operators';
|
|
14
|
+
import { AuthErrorType } from '../auth-types';
|
|
13
15
|
import * as i0 from "@angular/core";
|
|
14
16
|
import * as i1 from "@auth0/auth0-angular";
|
|
15
17
|
// Prevent tree-shaking by explicitly referencing the class
|
|
16
18
|
export function LoadMJAuth0Provider() {
|
|
17
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Auth0 authentication provider implementation - v3.0.0
|
|
22
|
+
*
|
|
23
|
+
* Implements the abstract methods from MJAuthBase to hide Auth0-specific details.
|
|
24
|
+
* The key abstraction is that Auth0 stores the JWT in `idTokenClaims.__raw`,
|
|
25
|
+
* but consumers never need to know this detail.
|
|
26
|
+
*/
|
|
18
27
|
let MJAuth0Provider = class MJAuth0Provider extends MJAuthBase {
|
|
19
28
|
static { MJAuth0Provider_1 = this; }
|
|
20
29
|
auth;
|
|
@@ -31,10 +40,11 @@ let MJAuth0Provider = class MJAuth0Provider extends MJAuthBase {
|
|
|
31
40
|
{
|
|
32
41
|
provide: AuthConfigService,
|
|
33
42
|
useValue: {
|
|
34
|
-
domain: environment
|
|
35
|
-
clientId: environment
|
|
43
|
+
domain: environment['AUTH0_DOMAIN'],
|
|
44
|
+
clientId: environment['AUTH0_CLIENTID'],
|
|
36
45
|
authorizationParams: {
|
|
37
46
|
redirect_uri: window.location.origin,
|
|
47
|
+
scope: 'openid profile email offline_access',
|
|
38
48
|
// No audience parameter - uses ID tokens (matches pre-refactor behavior)
|
|
39
49
|
// ID tokens have aud=clientId by default and contain user claims
|
|
40
50
|
},
|
|
@@ -58,109 +68,279 @@ let MJAuth0Provider = class MJAuth0Provider extends MJAuthBase {
|
|
|
58
68
|
};
|
|
59
69
|
super(config);
|
|
60
70
|
this.auth = auth;
|
|
61
|
-
// Defer subscription to avoid blocking app startup
|
|
62
71
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
this.
|
|
68
|
-
|
|
69
|
-
return of(void 0);
|
|
70
|
-
}
|
|
71
|
-
async ensureInitialized() {
|
|
72
|
-
if (!this._initialized) {
|
|
73
|
-
await this.initialize();
|
|
72
|
+
// ============================================================================
|
|
73
|
+
// LIFECYCLE METHODS
|
|
74
|
+
// ============================================================================
|
|
75
|
+
async initialize() {
|
|
76
|
+
if (this._initialized) {
|
|
77
|
+
return;
|
|
74
78
|
}
|
|
79
|
+
// CRITICAL: Wait for Auth0 SDK to process any redirect callback
|
|
80
|
+
// The SDK handles this internally and updates isLoading$ when done
|
|
81
|
+
await firstValueFrom(this.auth.isLoading$.pipe(filter(loading => !loading), take(1)));
|
|
82
|
+
// Get current authentication state
|
|
83
|
+
const isAuthenticated = await firstValueFrom(this.auth.isAuthenticated$);
|
|
84
|
+
// CRITICAL: Get current user BEFORE setting up subscriptions
|
|
85
|
+
// This ensures userInfo$ has a value before app.component.ts subscribes
|
|
86
|
+
if (isAuthenticated) {
|
|
87
|
+
const user = await firstValueFrom(this.auth.user$);
|
|
88
|
+
if (user) {
|
|
89
|
+
const userInfo = this.mapAuth0UserToStandard(user);
|
|
90
|
+
this.updateUserInfo(userInfo);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
// Subscribe to authentication state and user info for future changes
|
|
94
|
+
this.auth.isAuthenticated$.subscribe((loggedIn) => {
|
|
95
|
+
this.updateAuthState(loggedIn);
|
|
96
|
+
});
|
|
97
|
+
this.auth.user$.subscribe((user) => {
|
|
98
|
+
if (user) {
|
|
99
|
+
const userInfo = this.mapAuth0UserToStandard(user);
|
|
100
|
+
this.updateUserInfo(userInfo);
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
this.updateUserInfo(null);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
this._initialized = true;
|
|
107
|
+
}
|
|
108
|
+
async loginInternal(options) {
|
|
109
|
+
await this.ensureInitialized();
|
|
110
|
+
this.auth.loginWithRedirect(options);
|
|
75
111
|
}
|
|
76
112
|
async logout() {
|
|
77
113
|
this.auth.logout({ logoutParams: { returnTo: document.location.origin } });
|
|
78
114
|
}
|
|
79
|
-
async
|
|
115
|
+
async handleCallback() {
|
|
116
|
+
// Auth0 Angular SDK handles callbacks internally via interceptors
|
|
117
|
+
// This method exists for interface compatibility
|
|
118
|
+
}
|
|
119
|
+
// ============================================================================
|
|
120
|
+
// ABSTRACT METHOD IMPLEMENTATIONS (v3.0.0)
|
|
121
|
+
// ============================================================================
|
|
122
|
+
/**
|
|
123
|
+
* Extract ID token from Auth0's storage
|
|
124
|
+
*
|
|
125
|
+
* Auth0 stores the JWT string in idTokenClaims.__raw
|
|
126
|
+
* This is the key abstraction - consumers never need to know about __raw!
|
|
127
|
+
*/
|
|
128
|
+
async extractIdTokenInternal() {
|
|
129
|
+
try {
|
|
130
|
+
const claims = await firstValueFrom(this.auth.idTokenClaims$);
|
|
131
|
+
// Auth0-specific detail: JWT is in __raw property
|
|
132
|
+
return claims?.__raw || null;
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
console.error('[Auth0] Error extracting ID token:', error);
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Extract complete token info from Auth0
|
|
141
|
+
*
|
|
142
|
+
* Maps Auth0's token structure to StandardAuthToken
|
|
143
|
+
*/
|
|
144
|
+
async extractTokenInfoInternal() {
|
|
80
145
|
try {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
146
|
+
const claims = await firstValueFrom(this.auth.idTokenClaims$);
|
|
147
|
+
if (!claims) {
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
150
|
+
const idToken = claims.__raw;
|
|
151
|
+
if (!idToken) {
|
|
152
|
+
return null;
|
|
153
|
+
}
|
|
154
|
+
return {
|
|
155
|
+
idToken,
|
|
156
|
+
expiresAt: claims.exp ? claims.exp * 1000 : 0, // Convert to milliseconds
|
|
157
|
+
scopes: claims.scope ? claims.scope.split(' ') : undefined
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
catch (error) {
|
|
161
|
+
console.error('[Auth0] Error extracting token info:', error);
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Extract user info from Auth0 claims
|
|
167
|
+
*
|
|
168
|
+
* Maps Auth0's user object structure to StandardUserInfo
|
|
169
|
+
*/
|
|
170
|
+
async extractUserInfoInternal() {
|
|
171
|
+
try {
|
|
172
|
+
const user = await firstValueFrom(this.auth.user$);
|
|
173
|
+
if (!user) {
|
|
174
|
+
return null;
|
|
175
|
+
}
|
|
176
|
+
return this.mapAuth0UserToStandard(user);
|
|
177
|
+
}
|
|
178
|
+
catch (error) {
|
|
179
|
+
console.error('[Auth0] Error extracting user info:', error);
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Refresh token using Auth0's silent authentication
|
|
185
|
+
*
|
|
186
|
+
* Uses cacheMode: 'off' to bypass cache and force token refresh
|
|
187
|
+
* With useRefreshTokens: true and offline_access scope, this will use refresh tokens
|
|
188
|
+
*/
|
|
189
|
+
async refreshTokenInternal() {
|
|
190
|
+
try {
|
|
191
|
+
console.log('[Auth0] Attempting to refresh token...');
|
|
192
|
+
// Force token refresh by bypassing cache
|
|
193
|
+
// With useRefreshTokens: true and offline_access scope, this will use refresh tokens
|
|
84
194
|
await firstValueFrom(this.auth.getAccessTokenSilently({
|
|
85
|
-
cacheMode: 'off'
|
|
86
|
-
authorizationParams: {
|
|
87
|
-
ignoreCache: true
|
|
88
|
-
}
|
|
195
|
+
cacheMode: 'off'
|
|
89
196
|
}));
|
|
90
|
-
|
|
91
|
-
// Small delay to ensure Auth0 SDK has updated idTokenClaims$ observable
|
|
197
|
+
// Small delay to ensure Auth0 SDK has updated observables
|
|
92
198
|
await new Promise(resolve => setTimeout(resolve, 100));
|
|
93
|
-
//
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
199
|
+
// Extract fresh token info from updated observables
|
|
200
|
+
const token = await this.extractTokenInfoInternal();
|
|
201
|
+
if (!token) {
|
|
202
|
+
return {
|
|
203
|
+
success: false,
|
|
204
|
+
error: {
|
|
205
|
+
type: AuthErrorType.NO_ACTIVE_SESSION,
|
|
206
|
+
message: 'Token refresh succeeded but could not extract token info',
|
|
207
|
+
userMessage: 'Session refresh failed. Please log in again.'
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
console.log('[Auth0] Token refresh successful', {
|
|
212
|
+
expiresAt: new Date(token.expiresAt).toISOString()
|
|
98
213
|
});
|
|
99
|
-
|
|
100
|
-
|
|
214
|
+
return {
|
|
215
|
+
success: true,
|
|
216
|
+
token
|
|
217
|
+
};
|
|
101
218
|
}
|
|
102
219
|
catch (error) {
|
|
103
|
-
console.error('[Auth0]
|
|
104
|
-
|
|
105
|
-
|
|
220
|
+
console.error('[Auth0] Token refresh failed:', error);
|
|
221
|
+
return {
|
|
222
|
+
success: false,
|
|
223
|
+
error: this.classifyErrorInternal(error)
|
|
224
|
+
};
|
|
106
225
|
}
|
|
107
226
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
227
|
+
/**
|
|
228
|
+
* Classify Auth0-specific errors into semantic types
|
|
229
|
+
*
|
|
230
|
+
* Maps Auth0 error patterns to AuthErrorType enum
|
|
231
|
+
*/
|
|
232
|
+
classifyErrorInternal(error) {
|
|
233
|
+
const errorObj = error;
|
|
234
|
+
const message = errorObj?.['message'] || 'Unknown error';
|
|
235
|
+
const errorType = errorObj?.['error'] || '';
|
|
236
|
+
// Check for specific Auth0 error patterns
|
|
237
|
+
if (message.includes('jwt expired') || message.includes('token expired')) {
|
|
238
|
+
return {
|
|
239
|
+
type: AuthErrorType.TOKEN_EXPIRED,
|
|
240
|
+
message,
|
|
241
|
+
originalError: error,
|
|
242
|
+
userMessage: 'Your session has expired. Please log in again.'
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
if (errorType === 'login_required' || message.includes('login_required')) {
|
|
246
|
+
return {
|
|
247
|
+
type: AuthErrorType.NO_ACTIVE_SESSION,
|
|
248
|
+
message,
|
|
249
|
+
originalError: error,
|
|
250
|
+
userMessage: 'You need to log in to continue.'
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
if (errorType === 'consent_required' || message.includes('consent_required')) {
|
|
254
|
+
return {
|
|
255
|
+
type: AuthErrorType.INTERACTION_REQUIRED,
|
|
256
|
+
message,
|
|
257
|
+
originalError: error,
|
|
258
|
+
userMessage: 'Additional permissions are required. Please log in again.'
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
if (message.includes('user closed') || message.includes('cancelled')) {
|
|
262
|
+
return {
|
|
263
|
+
type: AuthErrorType.USER_CANCELLED,
|
|
264
|
+
message,
|
|
265
|
+
originalError: error,
|
|
266
|
+
userMessage: 'Login was cancelled.'
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
if (message.includes('network') || message.includes('fetch')) {
|
|
270
|
+
return {
|
|
271
|
+
type: AuthErrorType.NETWORK_ERROR,
|
|
272
|
+
message,
|
|
273
|
+
originalError: error,
|
|
274
|
+
userMessage: 'Network error. Please check your connection and try again.'
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
// Default to unknown error
|
|
278
|
+
return {
|
|
279
|
+
type: AuthErrorType.UNKNOWN_ERROR,
|
|
280
|
+
message,
|
|
281
|
+
originalError: error,
|
|
282
|
+
userMessage: 'An unexpected error occurred. Please try again.'
|
|
283
|
+
};
|
|
115
284
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
console.log('[Auth0] Got ID token claims');
|
|
123
|
-
// Return claims with __raw containing the JWT string
|
|
124
|
-
return of(idTokenClaims);
|
|
125
|
-
}
|
|
126
|
-
checkExpiredTokenError(error) {
|
|
127
|
-
return error?.includes('jwt expired');
|
|
128
|
-
}
|
|
129
|
-
// Add required methods for the new interface
|
|
130
|
-
async initialize() {
|
|
131
|
-
if (this._initialized) {
|
|
132
|
-
return;
|
|
285
|
+
// ============================================================================
|
|
286
|
+
// HELPER METHODS
|
|
287
|
+
// ============================================================================
|
|
288
|
+
async ensureInitialized() {
|
|
289
|
+
if (!this._initialized) {
|
|
290
|
+
await this.initialize();
|
|
133
291
|
}
|
|
134
|
-
// Auth0 Angular SDK handles initialization internally
|
|
135
|
-
// Just subscribe to authentication state once
|
|
136
|
-
this.auth.isAuthenticated$.subscribe((loggedIn) => {
|
|
137
|
-
this.updateAuthState(loggedIn);
|
|
138
|
-
});
|
|
139
|
-
this._initialized = true;
|
|
140
292
|
}
|
|
141
|
-
|
|
142
|
-
|
|
293
|
+
/**
|
|
294
|
+
* Map Auth0 User object to StandardUserInfo
|
|
295
|
+
*/
|
|
296
|
+
mapAuth0UserToStandard(user) {
|
|
297
|
+
return {
|
|
298
|
+
id: user.sub || '',
|
|
299
|
+
email: user.email || '',
|
|
300
|
+
name: user.name || '',
|
|
301
|
+
givenName: user.given_name,
|
|
302
|
+
familyName: user.family_name,
|
|
303
|
+
preferredUsername: user.nickname,
|
|
304
|
+
pictureUrl: user.picture,
|
|
305
|
+
locale: user.locale,
|
|
306
|
+
emailVerified: user.email_verified
|
|
307
|
+
};
|
|
143
308
|
}
|
|
144
|
-
|
|
309
|
+
/**
|
|
310
|
+
* Get profile picture URL from Auth0
|
|
311
|
+
*
|
|
312
|
+
* Auth0 includes the picture URL directly in user claims.
|
|
313
|
+
* No additional API call needed.
|
|
314
|
+
*/
|
|
315
|
+
async getProfilePictureUrlInternal() {
|
|
145
316
|
try {
|
|
146
|
-
const
|
|
147
|
-
return
|
|
317
|
+
const user = await firstValueFrom(this.auth.user$);
|
|
318
|
+
return user?.picture || null;
|
|
148
319
|
}
|
|
149
320
|
catch (error) {
|
|
150
|
-
console.error('Error getting
|
|
321
|
+
console.error('[Auth0] Error getting profile picture:', error);
|
|
151
322
|
return null;
|
|
152
323
|
}
|
|
153
324
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
325
|
+
/**
|
|
326
|
+
* Handle session expiry - no-op for Auth0
|
|
327
|
+
*
|
|
328
|
+
* Auth0 uses refresh tokens (offline_access scope), so it doesn't need
|
|
329
|
+
* interactive re-authentication when tokens expire. If refresh fails,
|
|
330
|
+
* the base class will throw an error and the user must log out/in manually.
|
|
331
|
+
*/
|
|
332
|
+
async handleSessionExpiryInternal() {
|
|
333
|
+
// No-op - Auth0 doesn't need interactive re-auth
|
|
334
|
+
return;
|
|
157
335
|
}
|
|
336
|
+
// ============================================================================
|
|
337
|
+
// CONFIGURATION
|
|
338
|
+
// ============================================================================
|
|
158
339
|
getRequiredConfig() {
|
|
159
340
|
return ['clientId', 'domain'];
|
|
160
341
|
}
|
|
161
342
|
validateConfig(_config) {
|
|
162
343
|
// Auth0 configuration is handled by Angular module providers
|
|
163
|
-
// Prefix with underscore to indicate intentionally unused
|
|
164
344
|
return true;
|
|
165
345
|
}
|
|
166
346
|
static ɵfac = function MJAuth0Provider_Factory(t) { return new (t || MJAuth0Provider)(i0.ɵɵinject(i1.AuthService)); };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mjexplorer-auth0-provider.service.js","sourceRoot":"","sources":["../../../src/lib/providers/mjexplorer-auth0-provider.service.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAiB,SAAS,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC1J,OAAO,
|
|
1
|
+
{"version":3,"file":"mjexplorer-auth0-provider.service.js","sourceRoot":"","sources":["../../../src/lib/providers/mjexplorer-auth0-provider.service.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,wB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