Sing out from apple

Sign in with your Apple ID

Your Apple ID is the account that you use to access all Apple services and make all of your devices work together seamlessly. After you log in, you can use the App Store, iCloud, iMessage, Apple Music, Apple TV+, and more.

Want to use Sign in with Apple on third-party apps or websites? Learn how to use Sign in with Apple.

Sign in on your iPhone, iPad, or iPod touch

Sign in on your Mac

Sign in on your Apple TV

Sign in on apps and other devices

Sign in on your iPhone, iPad, or iPod touch

  1. Open the Settings app.
  2. Tap Sign in to your [device].
  3. Enter your Apple ID and password.
  4. If prompted, enter the six-digit verification code sent to your trusted device or phone number and complete sign in.

If you’re already signed in to iCloud on the iPhone paired with your Apple Watch, you will automatically be signed in to that Apple ID. Learn more about how to set up and sign in to your Apple Watch.

Sign in on your Mac

  1. Choose Apple menu  > System Preferences.
  2. Click Sign In.
  3. Enter your Apple ID and password.
  4. If prompted, enter the six-digit verification code sent to your trusted device or phone number and complete sign in.

Sign in on Apple TV

  1. From the Home screen, choose Settings.
  2. Then choose Users and Accounts and select Add New User…
  3. Select Enter New…, then follow the on screen instructions.

If you use two-factor authentication on an Apple TV (2nd or 3rd generation), you might need to enter a verification code with your password. Learn how to get a verification code on your trusted device or sent to your trusted phone number.

Sign in on apps and other devices

You can use your Apple ID on some third-party devices to sign in to Apple services like Apple Music, the Apple TV app, and more.

Depending on your device, you might need to use an app-specific password.

Sign in to use Apple Music, the Apple TV app, and more on your other devices

You can sign in to Apple Music on Android, or sign in to the Apple TV app on your smart TV or streaming device.

On your Windows PC, you can sign in to iTunes for Windows to buy movies and TV shows, or listen to songs on Apple Music.

Sign in to use iCloud on your other devices

On your Windows PC, you can set up and sign in to iCloud for Windows to access photos, documents, and more.

You can also sign in to iCloud.com from your browser. Learn which iCloud.com features are available on your device.

Use Sign in with Apple on third-party apps and websites

If you see a Sign in with Apple button on a participating third-party app or website, you can use your existing Apple ID to quickly set up an account and sign in. Learn how to use Sign in with Apple.

Читайте также:  Часы xiaomi совместимость с iphone

When you sign in to the App Store and other media services for the first time, you might need to add a credit card or other payment information. You can’t sign in to the App Store and other media services with more than one Apple ID at the same time, or update the content you buy with a different Apple ID. Depending on how you created your Apple ID, you might be prompted to upgrade to two-factor authentication on an eligible device.

Learn more

  • To view and manage your Apple ID account details on the web, sign in to appleid.apple.com.
  • Learn more about where you can use your Apple ID.
  • Learn how to manage your subscriptions to services like Apple Music or Apple TV+.
  • If you have multiple Apple IDs, you can’t merge them.

Information about products not manufactured by Apple, or independent websites not controlled or tested by Apple, is provided without recommendation or endorsement. Apple assumes no responsibility with regard to the selection, performance, or use of third-party websites or products. Apple makes no representations regarding third-party website accuracy or reliability. Contact the vendor for additional information.

Источник

The fast, easy way to sign in to apps and websites.

Sign in with Apple makes it easy for users to sign in to your apps and websites using their Apple ID. Instead of filling out forms, verifying email addresses, and choosing new passwords, they can use Sign in with Apple to set up an account and start using your app right away. All accounts are protected with two-factor authentication for superior security, and Apple will not track users’ activity in your app or website.

Respect for privacy.

Sign in with Apple was built from the ground up to give users peace of mind about their privacy. Data collection is limited to the user’s name and email address, and Apple’s private email relay lets users receive email even if they prefer to keep their address private. Apple will not track users as they interact with your app.

Security built in.

Every account using Sign in with Apple is automatically protected with two-factor authentication. On Apple devices, users are persistently signed in and can re-authenticate anytime with Face ID or Touch ID.

Antifraud.

Sign in with Apple is designed to give you confidence in your new users. It uses on-device machine learning and other information to provide a new privacy-friendly signal that helps you determine if a new user is a real person or an account you might want to take another look at.

Works everywhere.

Sign in with Apple works natively on iOS, macOS, tvOS, and watchOS. And it works in any browser, which means you can deploy it on your website and in versions of your apps running on other platforms.

Get Started

Learn how to plan, implement, and test Sign in with Apple in your apps and websites.

Источник

Внедряем Sign in with Apple — систему авторизации от Apple

Этим летом на конференции WWDC 2019 Apple представила собственную систему авторизации Sign in with Apple и сделала ее обязательной для всех приложений в App Store, которые используют вход через соцсети. Исключение составляют образовательные, корпоративные, правительственные и бизнес-приложения, использующие собственную авторизацию. К Sign in with Apple Apple сделала качественную документацию, и в этой статье мы на примере ЦИАН расскажем, как внедрить ее в свой сервис.

Настраиваем Apple Developer Account

Работа по интеграции начинается с настройки аккаунта разработчика. Сначала нужно включить опцию Sign In with Apple для вашего App ID. Для этого заходим в список идентификаторов в Apple Developer Account, выбираем необходимый App ID и включаем для него опцию Sign In with Apple.

Теперь настраиваем Service ID — уникальный идентификатор web-приложения, который понадобится для обращения к Sign in with Apple API. Всего на один App ID можно создать до 5 Service ID. Для этого нажимаем кнопку создания идентификаторов, выбираем Service ID, заполняем необходимые поля и нажимаем Edit в поле Sign In With Apple. Откроется форма, где выбираем правильный Primary App ID, указываем веб-домен и перечислям URL для редиректа после успешного логина. Надо учитывать, что можно ввести только 10 Return URLs:

Читайте также:  Как часто ломаются айфоны статистика

Для сохранения нажимаем Save, Continue и Register. Да, при любых изменениях конфигурации необходимо нажимать все три кнопки, иначе изменения не вступят в силу.

Теперь в списке Service ID выбираем созданный идентификатор и опять нажимаем Edit в поле Sign In With Apple. В открывшемся окне у поля с веб-адресом видим две новые кнопки:

Этот файл необходим, чтобы Apple верифицировала ваш ресурс. Скачиваем его и размещаем его на своем ресурсе. Сразу у нас этот финт не сработал: когда наши админы добавили файл, то по указанному url срабатывал редирект (302) на файл, лежащий в другом месте, и Apple его не верифицировал. Тогда пришлось размещать файл по прямому доступу по URL (200). После того как Apple успешно проверит файл, рядом с доменом загорится зеленая галочка:

Из раздела идентификаторов переходим в раздел Keys и создаем новый ключ. Для этого ставим галочку Sign In with Apple и нажимаем сначала Configure, чтобы проверить App ID, затем Continue:

На следующем экране обязательно скачиваем файл с ключом и сохраняем его в безопасном месте, так как после ухода с этого экрана ключ будет недоступен для скачивания. На этой же странице можно увидеть Key ID, который нам еще понадобится:

Для пользователей у Sign In with Apple есть бонус: она позволяет предоставить фейковый e-mail, на который можно писать только с доверенных адресов. В этом случае нужна дополнительная настройка. Открываем раздел More, нажимаем Configure в разделе Sign In with Apple и вписываем свой URL:

Добавляем кнопку Sign In with Apple в iOS-приложение

ЦИАН работает на трех платформах: iOS, Android, Web. Для iOS есть нативное SDK, поэтому авторизация будет выглядеть следующим образом:

Чтобы добавить в iOS-приложение Sign in with Apple, добавляем кнопку ASAuthorizationAppleIDButton и вешаем на нее обработчик нажатия:

Кроме ASAuthorizationAppleIDProvider, обратите внимание еще на ASAuthorizationPasswordProvider, который позволяет получать связки «логин-пароль» из Keychain.

Теперь мы реализуем ASAuthorizationControllerPresentationContextProviding:

Создаем делегат ASAuthorizationControllerDelegate, который сообщает об успехе или ошибке:

Полученный authorizationCode мы отправляем на сервер и ждем ответа от бэкенда об успешности авторизации в нашей системе.

Реализуем Sign in with Apple для web и Android

Внезапно, для Android и Web Apple не предоставляет SDK, поэтому в обоих случаях нужно открыть страницу авторизации от Apple и процесс будет иным:

URL для страницы авторизации выглядит следующим образом:

Рассмотрим его параметры:

  • client_id — Service ID, который регистрировали выше.
  • redirect_uri — URI, куда пользователь перенаправляется после успешной аутентификации через AppleID. Этот URI мы указывали выше при настройке Apple Developer.
  • state — идентификатор сессии пользователя, который Apple вернет при вызове redirect_uri, чтобы мы могли проверить отправителя. Правило генерации этого параметра можете придумать самостоятельно, например, рандомную строку.
  • scope — в этом параметре указывается, какая нужна информация от пользователя. Например, name, email или сразу оба, как в примере выше.
  • response_type — этот параметр указывает, в каком виде нужен ответ. Он может быть code или id_token. Если выбрать id_token, то его нужно уточнить параметром response_mode, в котором можно указать query, fragment и form_post.

После успешной двухфакторной аутентификации через appleID Apple вызовет указанный redirect_uri и передаст параметры state и code:

В параметре code передается одноразовый код аутентификации пользователя, который действует в течение 5 минут. В параметре state — идентификатор сессии, отправленный при создании формы авторизации, а в параметре user — данные пользователя.

Получение данных

На всех клиентах, чтобы сохранить данные пользователя, нужно получить от Apple access_token. Для этого сначала запрашиваем authorization_code:

  • в client_id указывается созданный для web-приложений ServiceID и AppID для iOS-приложения.
  • code — мы получили выше после редиректа или передали с iOS-клиента
  • в параметре grant_type передаем цель получения токена: авторизация (authorization_code) или продление токена (refresh_token)
  • в параметре client_secret — JSON Web Tokens на основе секретного ключа, полученного при регистрации приложения.

Создать JSON Web Tokens можно на Python:

Если все прошло успешно, то в ответе придут такие параметры:

Ура, вот и access_token. Вместе с ним приходит refresh_token, которым можно обновить при необходимости access_token.

Читайте также:  Прослушивание звонков с айфона

Информация о пользователе хранится в поле id_token, но его нужно декодировать:

Apple_public_key — это публичный ключ, который можно получить по ссылке.

После декодирования получаем:

Email передается только один раз, когда пользователь впервые авторизуется в вашем сервисе через Sign in with Apple. В следующий раз Apple передаст эти данные только в том случае, если пользователь самостоятельно отвяжет ваше приложение. Этим авторизация от Apple отличается от других сервисов, где данные можно получить через API, и мы не нашли информацию о том, что они планируют реализовать что-то подобное.

В этом ответе нам нужны параметры sub, который передается каждый раз, и email, поэтому мы сохраняем их у себя в системе и сообщаем клиенту о успешной авторизации. PROFIT.

Источник

Sign out of iCloud on your iPhone, iPad, iPod touch, Apple TV, or Mac

If you want to stop using iCloud on one of your devices, learn how to sign out and what happens when you sign out.

What happens when you sign out of iCloud on your device

You can sign out of iCloud any time you like to stop using iCloud and its related services on your device. These services are listed below. Before signing out, make sure that you’re comfortable having these services turned off. If you only want to stop using some iCloud features, you can change your iCloud settings instead of signing out of iCloud.

  • Apple Pay, Apple Cash, and Apple Card*
  • Find My
  • Game Center
  • Home app to control your HomeKit devices
  • iCloud Backup
  • iCloud Drive
  • iCloud Keychain
  • iCloud Mail
  • iCloud Photos
  • Siri Shortcuts
  • Voice Memos
  • Shared Albums
  • Messages in iCloud
  • Reminders
  • Shared Notes
  • Shared Pages, Numbers, and Keynote documents
  • Updates to your contacts, calendars, reminders, bookmarks, and Safari tabs
  • Continuity features like Handoff, Universal Clipboard, and Auto Unlock with your Apple Watch
  • App data for any third-party apps that you’ve installed that use iCloud

When you sign out, any data stored in iCloud will be removed from your device but will remain in iCloud. Before you sign out, you’ll be asked if you want to keep a copy of any of this information on your device.

If you have iCloud+ and you sign out of iCloud on your device, you lose access to iCloud Private Relay, Hide My Email, HomeKit Secure Video support, and custom email domain** on that device.

* Your Apple Cash and Apple Card accounts are linked to your Apple ID. They can’t be transferred to a different Apple ID or accessed by a different Apple ID.

** Not all features are available in all countries or regions.

How to keep using the App Store, iMessage, and FaceTime on your device

When you sign out of iCloud, you’re also automatically signed out of the App Store, iMessage, and FaceTime.

  • To keep using the App Store, sign in with your Apple ID.
  • To keep using iMessage and FaceTime, use your phone number.

Sign out on your iPhone, iPad, or iPod touch

  1. Go to Settings > [your name].
  2. Scroll down to the bottom.
  3. Tap Sign Out.
  4. Enter your Apple ID password and tap Turn Off. Forgot your Apple ID password?
  5. Turn on the data that you want to keep a copy of on your device.
  6. Tap Sign Out.
  7. Tap Sign Out again to confirm that you want to sign out of iCloud.

Sign out on your Mac

  1. Choose Apple menu  > System Preferences.
  2. Click Apple ID, then click Overview. If you use macOS High Sierra or earlier, click iCloud.
  3. Click Sign Out.
  4. If you want to a keep a copy of your iCloud data on your Mac before you sign out, make sure that you select the appropriate checkboxes. Then click Keep a Copy.
  5. If you want to keep a copy of your Safari passwords on your Mac, click Keep on This Mac.

Sign out on your Apple Watch

When you sign out of iCloud on the iPhone that’s paired with your Apple Watch, you’re automatically signed out of iCloud on your Apple Watch.

Источник

Оцените статью