UNPKG

auth0-lock

Version:
73 lines (71 loc) 3.09 kB
"use strict"; function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } Object.defineProperty(exports, "__esModule", { value: true }); exports.STRATEGIES = void 0; exports.authButtonsTheme = authButtonsTheme; exports.displayName = displayName; exports.socialConnections = socialConnections; var l = _interopRequireWildcard(require("../../core/index")); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } // TODO: Android version also has "unknonwn-social", "evernote" and // "evernote-sandbox""evernote" in the list, considers "google-openid" // to be enterprise and doesn't contain "salesforce-community". See // https://github.com/auth0/Lock.Android/blob/98262cb7110e5d1c8a97e1129faf2621c1d8d111/lock/src/main/java/com/auth0/android/lock/utils/Strategies.java var STRATEGIES = exports.STRATEGIES = { apple: 'Apple', amazon: 'Amazon', aol: 'Aol', baidu: '百度', bitbucket: 'Bitbucket', box: 'Box', dropbox: 'Dropbox', dwolla: 'Dwolla', ebay: 'ebay', exact: 'Exact', facebook: 'Facebook', fitbit: 'Fitbit', github: 'GitHub', 'google-openid': 'Google OpenId', 'google-oauth2': 'Google', instagram: 'Instagram', linkedin: 'LinkedIn', miicard: 'miiCard', paypal: 'PayPal', 'paypal-sandbox': 'PayPal Sandbox', planningcenter: 'Planning Center', renren: '人人', salesforce: 'Salesforce', 'salesforce-community': 'Salesforce Community', 'salesforce-sandbox': 'Salesforce (sandbox)', evernote: 'Evernote', 'evernote-sandbox': 'Evernote (sandbox)', shopify: 'Shopify', shop: 'Shop', soundcloud: 'Soundcloud', thecity: 'The City', 'thecity-sandbox': 'The City (sandbox)', thirtysevensignals: 'Basecamp', twitter: 'X', vkontakte: 'vKontakte', windowslive: 'Microsoft', wordpress: 'Wordpress', yahoo: 'Yahoo!', yammer: 'Yammer', yandex: 'Yandex', weibo: '新浪微博', line: 'Line' }; function displayName(connection) { if (['oauth1', 'oauth2'].indexOf(connection.get('strategy')) !== -1) { return connection.get('displayName') || connection.get('name'); } return STRATEGIES[connection.get('strategy')]; } function socialConnections(m) { return l.connections(m, 'social'); } function authButtonsTheme(m) { return l.ui.authButtonsTheme(m); }