UNPKG

@stacks/auth

Version:

Authentication for Stacks apps.

24 lines 978 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AppConfig = void 0; const constants_1 = require("./constants"); const common_1 = require("@stacks/common"); class AppConfig { constructor(scopes = constants_1.DEFAULT_SCOPE.slice(), appDomain = (0, common_1.getGlobalObject)('location', { returnEmptyObject: true }) ?.origin, redirectPath = '', manifestPath = '/manifest.json', coreNode = undefined, authenticatorURL = constants_1.DEFAULT_BLOCKSTACK_HOST) { this.appDomain = appDomain; this.scopes = scopes; this.redirectPath = redirectPath; this.manifestPath = manifestPath; this.coreNode = coreNode; this.authenticatorURL = authenticatorURL; } redirectURI() { return `${this.appDomain}${this.redirectPath}`; } manifestURI() { return `${this.appDomain}${this.manifestPath}`; } } exports.AppConfig = AppConfig; //# sourceMappingURL=appConfig.js.map