:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/../../GodotApplePlugins/doc_classes/ASAuthorizationController.xml. .. _class_ASAuthorizationController: ASAuthorizationController ========================= **Inherits:** :ref:`RefCounted` **<** :ref:`Object` Manages authorization requests for Apple ID and other services. .. rst-class:: classref-introduction-group Description ----------- This class handles the presentation and management of authorization flows, such as Sign in with Apple. It interacts with the :ref:`ASAuthorizationAppleIDCredential` and :ref:`ASPasswordCredential` classes to return the result of an authorization request. You can use :ref:`signin_with_scopes()` to request specific scopes (e.g., full name and email) or :ref:`signin()` for a default sign-in flow. .. tabs:: .. code-tab:: gdscript var auth_controller = ASAuthorizationController.new() func _ready(): auth_controller.authorization_completed.connect(_on_authorization_completed) auth_controller.authorization_failed.connect(_on_authorization_failed) func _on_sign_in_button_pressed(): # Request full name and email auth_controller.signin_with_scopes(["full_name", "email"]) func _on_authorization_completed(credential): if credential is ASAuthorizationAppleIDCredential: print("User ID: ", credential.user) print("Email: ", credential.email) print("Full Name: ", credential.fullName) elif credential is ASPasswordCredential: print("User: ", credential.user) print("Password: ", credential.password) func _on_authorization_failed(error_message): print("Authorization failed: ", error_message) .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +--------+--------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`signin`\ (\ ) | +--------+--------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`signin_with_scopes`\ (\ scopeStrings\: :ref:`Array`\ ) | +--------+--------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Signals ------- .. _class_ASAuthorizationController_signal_authorization_completed: .. rst-class:: classref-signal **authorization_completed**\ (\ credential\: :ref:`RefCounted`\ ) :ref:`🔗` Emitted when the authorization request completes successfully. \ ``credential`` is usually an :ref:`ASAuthorizationAppleIDCredential` or :ref:`ASPasswordCredential`. It can be null if the credential type is unsupported. .. rst-class:: classref-item-separator ---- .. _class_ASAuthorizationController_signal_authorization_failed: .. rst-class:: classref-signal **authorization_failed**\ (\ error\: :ref:`String`\ ) :ref:`🔗` Emitted when the authorization request fails. \ ``error`` contains the localized description of the error. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ASAuthorizationController_method_signin: .. rst-class:: classref-method |void| **signin**\ (\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_ASAuthorizationController_method_signin_with_scopes: .. rst-class:: classref-method |void| **signin_with_scopes**\ (\ scopeStrings\: :ref:`Array`\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`