@ozdao/prometheus-framework 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ozdao/prometheus-framework",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Web3 Framework focused on user experience and ease of development.",
5
5
  "author": "OZ DAO <hello@ozdao.dev>",
6
6
  "license": "GPL-3.0-or-later",
@@ -125,7 +125,7 @@ import Field from '@pf/src/components/Field/Field.vue'
125
125
  import FieldPhone from '@pf/src/components/FieldPhone/FieldPhone.vue'
126
126
  import Button from '@pf/src/components/Button/Button.vue'
127
127
  // Import libs
128
- import { computed, onMounted, ref } from 'vue'
128
+ import { computed, onMounted, ref, inject } from 'vue'
129
129
  import { useRoute, useRouter } from 'vue-router'
130
130
  import { useI18n } from 'vue-i18n'
131
131
  // Import state
@@ -158,17 +158,18 @@ const callOnFailure = (error) => {
158
158
  console.log("Apple login failure:", error);
159
159
  };
160
160
 
161
+ const clientId = inject('APPLE_CLIENTID')
162
+ const redirectURI = inject('API_URL')
163
+
161
164
  const initAppleSignIn = () => {
162
165
  if (!window.AppleID) {
163
166
  console.error('"https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js" needs to be included as a <script>');
164
167
  return;
165
168
  }
166
169
 
167
- const clientId = process.env.APPLE_CLIENTID; // Укажите ваш client ID
168
- const redirectURI = process.env.API_URL; // Укажите ваш redirect URI
169
- const scope = 'email'; // Укажите необходимые scope
170
- const state = '123';
171
- const usePopup = true; // Использовать попап или нет
170
+ let scope = 'email'; // Укажите необходимые scope
171
+ let state = '123';
172
+ let usePopup = true; // Использовать попап или нет
172
173
 
173
174
  window.AppleID.auth.init({
174
175
  clientId,
@@ -182,6 +183,8 @@ const initAppleSignIn = () => {
182
183
  document.addEventListener('AppleIDSignInOnFailure', callOnFailure);
183
184
  };
184
185
 
186
+
187
+
185
188
  const appleSignIn = () => {
186
189
  try {
187
190
  window.AppleID.auth.signIn();