fix(auth): preserve legacy provider setup
This commit is contained in:
@@ -10,10 +10,10 @@ export function normalizeMarketplaceDomain(domain: string): string {
|
|||||||
|
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class AuthMarketplaceContext {
|
export class AuthMarketplaceContext {
|
||||||
private readonly config = inject(MARKETPLACES_AUTH_CONFIG);
|
private readonly config = inject(MARKETPLACES_AUTH_CONFIG, { optional: true });
|
||||||
|
|
||||||
domain(): string {
|
domain(): string {
|
||||||
const configured = this.config.marketplaceDomain;
|
const configured = this.config?.marketplaceDomain;
|
||||||
const domain = typeof configured === 'function'
|
const domain = typeof configured === 'function'
|
||||||
? configured()
|
? configured()
|
||||||
: configured ?? (typeof location === 'undefined' ? '' : location.hostname);
|
: configured ?? (typeof location === 'undefined' ? '' : location.hostname);
|
||||||
|
|||||||
Reference in New Issue
Block a user