Using the SDK
Authorization
To start user authorization, use the following YandexLoginSDK method:
func authorize(with: UIViewController, customValues: [String: String]?, authorizationStrategy: AuthorizationStrategy) throws
parentViewControlleris a required parameter.customValueshas a default value of "nil".authorizationStrategyis described in detail in Method guide.
To get the authorization result, you need to register a YandexLoginSDK observer using the add(observer:) method. When you no longer need notifications from SDK Yandex ID, you can unregister the observer using the remove(observer:) method. The observer must correspond to the LoginSDKObserver protocol.
Getting information about the user
You can exchange the obtained token for user information.
Logout
To delete locally stored tokens, use the logout() method of the YandexLoginSDK class.
Useful links
Was the article helpful?
Previous
Next