Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
authflow.php
1<?php
2
4
5use \Bitrix\Main\Context,
9
10
12{
13 private const APPLE_OAUTH_URL = 'https://appleid.apple.com/auth/authorize';
14
15 public function configureActions(): array
16 {
17 return [
18 'signInApple' => [
19 '-prefilters' => [
20 Csrf::class,
21 Authentication::class
22 ]
23 ]
24 ];
25 }
26
27 public function signInAppleAction(): void
28 {
29 $redirectUrl = $this->getRequest()->getQuery('url');
30
31 if (strpos($redirectUrl, self::APPLE_OAUTH_URL) === 0)
32 {
33 LocalRedirect($redirectUrl, true);
34 die();
35 }
36 }
37}