@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
@@ -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
|
-
|
168
|
-
|
169
|
-
|
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();
|