UNPKG

4.29 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.LOGIN_CLIENT_ID = process.env.BEARER_LOGIN_CLIENT_ID || 'Wgll39KqWnJWud473wq7hZhiXxeNjEU7';
4exports.BEARER_ENV = process.env.BEARER_ENV || 'production';
5exports.BEARER_AUTH_PORT = 45677;
6exports.BEARER_LOGIN_PORT = 56789;
7exports.CONFIGS = {
8 dev: {
9 IntegrationServiceHost: 'https://int.dev.bearer.sh/',
10 IntegrationServiceUrl: 'https://int.dev.bearer.sh/api/v1/',
11 DeveloperPortalAPIUrl: 'https://api.staging.bearer.sh/graphql',
12 DeveloperPortalUrl: 'https://app.staging.bearer.sh/',
13 CdnHost: 'https://static.dev.bearer.sh',
14 BearerEnv: 'dev',
15 LoginDomain: 'https://login.bearer.sh'
16 },
17 staging: {
18 IntegrationServiceHost: 'https://int.staging.bearer.sh/',
19 IntegrationServiceUrl: 'https://int.staging.bearer.sh/api/v1/',
20 DeveloperPortalAPIUrl: 'https://api.staging.bearer.sh/graphql',
21 DeveloperPortalUrl: 'https://app.staging.bearer.sh/',
22 CdnHost: 'https://static.staging.bearer.sh',
23 BearerEnv: 'staging',
24 LoginDomain: 'https://login.bearer.sh'
25 },
26 production: {
27 IntegrationServiceHost: 'https://int.bearer.sh/',
28 IntegrationServiceUrl: 'https://int.bearer.sh/api/v1/',
29 DeveloperPortalAPIUrl: 'https://api.bearer.sh/graphql',
30 DeveloperPortalUrl: 'https://app.bearer.sh/',
31 CdnHost: 'https://static.bearer.sh',
32 BearerEnv: 'production',
33 LoginDomain: 'https://login.bearer.sh'
34 }
35};
36// tslint:disable max-line-length
37exports.SUCCESS_LOGIN_PAGE = `
38<!DOCTYPE html>
39<html lang="en">
40 <head>
41 <title>Authentication callback</title>
42 <meta charset="utf-8" />
43 <meta http-equiv="X-UA-Compatible" content="IE=edge" />
44 <meta name="viewport" content="width=device-width, initial-scale=1" />
45 <style>
46 * {
47 -webkit-font-smoothing: antialiased;
48 -moz-osx-font-smoothing: grayscale;
49 }
50 html,
51 body {
52 background-color: #f5f7fb;
53 font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
54 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
55 text-align: center;
56 font-size: 16px;
57 line-height: 16px;
58 }
59 h1 {
60 color: #00c682;
61 font-size: 2rem;
62 font-weight: 600;
63 letter-spacing: 0.99px;
64 line-height: 29px;
65 }
66 p {
67 color: #343c5d;
68 letter-spacing: 0.56px;
69 }
70 a {
71 border-radius: 4px;
72 display: inline-block;
73 margin-top: 32px;
74 padding: 12px 18px;
75 background-color: #030d36;
76 color: #ffffff;
77 font-weight: 600;
78 letter-spacing: 0.2px;
79 text-decoration: none;
80 }
81 .outer {
82 display: table;
83 position: absolute;
84 top: 0;
85 left: 0;
86 height: 100%;
87 width: 100%;
88 }
89 .middle {
90 display: table-cell;
91 vertical-align: middle;
92 }
93 .inner {
94 margin-left: auto;
95 margin-right: auto;
96 max-width: 700px;
97 }
98 .hint {
99 font-size: 0.9rem;
100 padding: 1.5rem;
101 border: 1px solid #c2c9ea;
102 border-radius: 4px;
103 background-color: #ffffff;
104 position: relative;
105 top: 60px;
106 margin-bottom: 60px;
107 }
108 </style>
109 </head>
110 <body>
111 <div class="outer">
112 <div class="middle">
113 <div class="inner">
114 <svg width="37" height="40" xmlns="http://www.w3.org/2000/svg">
115 <path
116 d="M.8 19.2h25.269l-6.635-6.634a.8.8 0 0 1 1.132-1.132l8 8a.8.8 0 0 1 0 1.132l-8 8a.8.8 0 0 1-1.132-1.132L26.07 20.8H.8a.8.8 0 0 1 0-1.6zm14.4 11.2a.8.8 0 0 1 .8.8v6.4a.8.8 0 0 0 .8.8h17.6a.8.8 0 0 0 .8-.8V2.4a.8.8 0 0 0-.8-.8H16.8a.8.8 0 0 0-.8.8v6.4a.8.8 0 0 1-1.6 0V2.4A2.4 2.4 0 0 1 16.8 0h17.6a2.4 2.4 0 0 1 2.4 2.4v35.2a2.4 2.4 0 0 1-2.4 2.4H16.8a2.4 2.4 0 0 1-2.4-2.4v-6.4a.8.8 0 0 1 .8-.8z"
117 fill="#00C682"
118 fill-rule="nonzero"
119 />
120 </svg>
121 <h1>Successfully authenticated</h1>
122 <p>You can close this window</p>
123 <br />
124 </div>
125 </div>
126 </div>
127 </body>
128</html>
129`;