1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-14 02:08:50 +02:00

stripe key in app settings

This commit is contained in:
Kyle Spearrin 2017-05-08 14:45:14 -04:00
parent f59b227c44
commit aeae0ba535
5 changed files with 10 additions and 7 deletions

View File

@ -1,6 +1,7 @@
{ {
"appSettings": { "appSettings": {
"apiUri": "https://preview-api.bitwarden.com", "apiUri": "https://preview-api.bitwarden.com",
"identityUri": "https://preview-identity.bitwarden.com" "identityUri": "https://preview-identity.bitwarden.com",
"stripeKey": "pk_test_KPoCfZXu7mznb9uSCPZ2JpTD"
} }
} }

View File

@ -1,6 +1,7 @@
{ {
"appSettings": { "appSettings": {
"apiUri": "https://api.bitwarden.com", "apiUri": "https://api.bitwarden.com",
"identityUri": "https://identity.bitwarden.com" "identityUri": "https://identity.bitwarden.com",
"stripeKey": "pk_live_bpN0P37nMxrMQkcaHXtAybJk"
} }
} }

View File

@ -1,6 +1,7 @@
{ {
"appSettings": { "appSettings": {
"apiUri": "http://localhost:4000", "apiUri": "http://localhost:4000",
"identityUri": "http://localhost:33656" "identityUri": "http://localhost:33656",
"stripeKey": "pk_test_KPoCfZXu7mznb9uSCPZ2JpTD"
} }
} }

View File

@ -2,7 +2,7 @@ angular
.module('bit') .module('bit')
.config(function ($stateProvider, $urlRouterProvider, $httpProvider, jwtInterceptorProvider, jwtOptionsProvider, .config(function ($stateProvider, $urlRouterProvider, $httpProvider, jwtInterceptorProvider, jwtOptionsProvider,
$uibTooltipProvider, toastrConfig, $locationProvider, $qProvider, stripeProvider) { $uibTooltipProvider, toastrConfig, $locationProvider, $qProvider, stripeProvider, appSettings) {
$qProvider.errorOnUnhandledRejections(false); $qProvider.errorOnUnhandledRejections(false);
$locationProvider.hashPrefix(''); $locationProvider.hashPrefix('');
jwtOptionsProvider.config({ jwtOptionsProvider.config({
@ -10,7 +10,7 @@ angular
whiteListedDomains: ['api.bitwarden.com', 'preview-api.bitwarden.com', 'localhost', '192.168.1.8'] whiteListedDomains: ['api.bitwarden.com', 'preview-api.bitwarden.com', 'localhost', '192.168.1.8']
}); });
var refreshPromise; var refreshPromise;
jwtInterceptorProvider.tokenGetter = /*@ngInject*/ function (options, appSettings, tokenService, authService) { jwtInterceptorProvider.tokenGetter = /*@ngInject*/ function (options, tokenService, authService) {
if (options.url.indexOf(appSettings.apiUri) !== 0) { if (options.url.indexOf(appSettings.apiUri) !== 0) {
return; return;
} }
@ -35,7 +35,7 @@ angular
return refreshPromise; return refreshPromise;
}; };
stripeProvider.setPublishableKey('pk_live_bpN0P37nMxrMQkcaHXtAybJk'); stripeProvider.setPublishableKey(appSettings.stripeKey);
angular.extend(toastrConfig, { angular.extend(toastrConfig, {
closeButton: true, closeButton: true,

View File

@ -1,2 +1,2 @@
angular.module("bit") angular.module("bit")
.constant("appSettings", {"apiUri":"https://api.bitwarden.com","identityUri":"https://identity.bitwarden.com","version":"1.10.1","environment":"Production"}); .constant("appSettings", {"apiUri":"https://api.bitwarden.com","identityUri":"https://identity.bitwarden.com","stripeKey":"pk_live_bpN0P37nMxrMQkcaHXtAybJk","version":"1.10.2","environment":"Production"});