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)

38 lines 1.7 kB
import { BASE_ROUTE, getAppRoute } from "./StitchRoutes"; function getAuthProviderRoute(clientAppId, providerName) { return 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 = 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; }()); export default StitchAppAuthRoutes; //# sourceMappingURL=StitchAppAuthRoutes.js.map