@opencampus/ocid-connect-js 2.0.4 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
- export default function LoginButton({ pill, disabled, theme, state }: {
1
+ export default function LoginButton({ pill, disabled, theme, state, emailPlaceholder }: {
2
2
  pill: any;
3
3
  disabled: any;
4
4
  theme: any;
5
5
  state: any;
6
+ emailPlaceholder: any;
6
7
  }): any;
@@ -85,7 +85,8 @@ function LoginButton(_ref) {
85
85
  var pill = _ref.pill,
86
86
  disabled = _ref.disabled,
87
87
  theme = _ref.theme,
88
- state = _ref.state;
88
+ state = _ref.state,
89
+ emailPlaceholder = _ref.emailPlaceholder;
89
90
  var _useOCAuth = (0, _OCContext.useOCAuth)(),
90
91
  ocAuth = _useOCAuth.ocAuth;
91
92
  var customTheme = themes[theme] || themes['ocBlue'];
@@ -96,7 +97,8 @@ function LoginButton(_ref) {
96
97
  case 0:
97
98
  _context.next = 2;
98
99
  return ocAuth.signInWithRedirect({
99
- state: state
100
+ state: state,
101
+ emailPlaceholder: emailPlaceholder
100
102
  });
101
103
  case 2:
102
104
  case "end":
@@ -1,13 +1,13 @@
1
- .ocSpinnerContainer {
1
+ .oc-spinner-container {
2
2
  position: relative;
3
3
 
4
- .ocLogoImg {
4
+ .oc-logo-img {
5
5
  position: absolute;
6
6
  top: 15%;
7
7
  left: 15%;
8
8
  }
9
9
 
10
- .ocSpinner {
10
+ .oc-spinner {
11
11
  width: 100%;
12
12
  height: 100%;
13
13
  border-radius: 50%;
package/lib/sdk/auth.js CHANGED
@@ -112,9 +112,10 @@ var OCAuthCore = exports.OCAuthCore = /*#__PURE__*/function () {
112
112
  meta = (0, _utils.createPkceMeta)(signinParams);
113
113
  this.transactionManager.save(meta);
114
114
  signinParams.referralCode = this.referralCode;
115
+ signinParams.emailPlaceholder = paramsClone.emailPlaceholder;
115
116
  requestUrl = (0, _endpoints.buildAuthEndpointUrl)(signinParams, this.loginEndPoint);
116
117
  window.location.assign(requestUrl);
117
- case 11:
118
+ case 12:
118
119
  case "end":
119
120
  return _context2.stop();
120
121
  }
@@ -38,5 +38,10 @@ var buildAuthEndpointUrl = exports.buildAuthEndpointUrl = function buildAuthEndp
38
38
  if (signInParams.referralCode) {
39
39
  loginUrl.searchParams.append('ref', signInParams.referralCode);
40
40
  }
41
+
42
+ // email data for register workflow
43
+ if (signInParams.emailPlaceholder) {
44
+ loginUrl.searchParams.append('emailPlaceholder', signInParams.emailPlaceholder);
45
+ }
41
46
  return loginUrl.href;
42
47
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencampus/ocid-connect-js",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "author": "Animoca Brands",
5
5
  "license": "MIT",
6
6
  "description": "OCID Connector Library",
@@ -85,6 +85,5 @@
85
85
  "*.js"
86
86
  ]
87
87
  }
88
- ],
89
- "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
88
+ ]
90
89
  }