UNPKG

mongodb-stitch

Version:

[![Join the chat at https://gitter.im/mongodb/stitch](https://badges.gitter.im/mongodb/stitch.svg)](https://gitter.im/mongodb/stitch?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

40 lines 1.8 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var StitchRoutes_1 = require("./StitchRoutes"); function getAuthProviderRoute(clientAppId, providerName) { return StitchRoutes_1.getAppRoute(clientAppId) + ("/auth/providers/" + providerName); } function getAuthProviderLoginRoute(clientAppId, providerName) { return getAuthProviderRoute(clientAppId, providerName) + "/login"; } function getAuthProviderLinkRoute(clientAppId, providerName) { return getAuthProviderLoginRoute(clientAppId, providerName) + "?link=true"; } var StitchAppAuthRoutes = (function () { function StitchAppAuthRoutes(clientAppId) { var _this = this; this.baseAuthRoute = StitchRoutes_1.BASE_ROUTE + "/auth"; this.sessionRoute = (function () { return _this.baseAuthRoute + "/session"; })(); this.profileRoute = (function () { return _this.baseAuthRoute + "/profile"; })(); this.clientAppId = clientAppId; } StitchAppAuthRoutes.prototype.getAuthProviderRoute = function (providerName) { return getAuthProviderRoute(this.clientAppId, providerName); }; StitchAppAuthRoutes.prototype.getAuthProviderLoginRoute = function (providerName) { return getAuthProviderLoginRoute(this.clientAppId, providerName); }; StitchAppAuthRoutes.prototype.getAuthProviderLinkRoute = function (providerName) { return getAuthProviderLinkRoute(this.clientAppId, providerName); }; StitchAppAuthRoutes.prototype.getAuthProviderExtensionRoute = function (providerName, path) { return this.getAuthProviderRoute(providerName) + "/" + path; }; return StitchAppAuthRoutes; }()); exports.default = StitchAppAuthRoutes; //# sourceMappingURL=StitchAppAuthRoutes.js.map